5 ms·
If people are using an XML parser they're still ahead of the majority of the software business. We have one partner that discovered a bug in our XML feed (deve
by mrweasel 12y ago
If people are using an XML parser they're still ahead of the majority of the software business.
We have one partner that discovered a bug in our XML feed (developed by a consultant), the bug on surfaces because they actually use an XML parser. They're the first of our customers to find this bug, in 10 years. The rest simple view the feed as plain text.
The consulting company that did the feed generation original also have something against using XML parsers. The only code they have that doesn't just concatenate strings is a logging library (A library we asked them to stop using because ther way to doing XML logs are useless with Splunk and pretty much any other tools).
- im2w1l 12y agoI once made a consumer for an xml api. I made a simple regex hack that worked fine. After reading some rants about "parsing" xml with regex I swapped it out for a real parser. A few minutes later the parsings started failing because there were unescaped <> characters in attributes. Reported the bug, got a wontfix back. I reverted to regex and it has been working fine ever since.
- bambax 12y agoIf there are unescaped <> chars in the "xml" then it's NOT xml and the API shouldn't be called "xml" but "plain text made to look a little like xml". The people producing such garbage should be ashamed of themselves and should be publicly shamed. Of course, as a consumer of the API we often don't have any power over the producer and have to swallow what we're given as is; but even in that case the correct approach is to have a first step of cleaning/correcting the xml (with something like Beautiful soup for example) and then feeding the clean xml to a proper parser.