4 ms·
XML isn't bad in and of itself. It's just a powerful, neutral format. The problem with XML is that it allows so much abuse. I had to interface with a governmen
by sofuture 16y ago
XML isn't bad in and of itself. It's just a powerful, neutral format. The problem with XML is that it allows so much abuse.
I had to interface with a government system at some point. They shipped us a whole schema of custom elements such as "IsShipment" (for example) which extended bool to allow extra options. All this was clearly documented in the schema comments "You can use 'true', 'false', 'sortof', and 'mostly'." So we go to validate the data.... and it doesn't validate. Against their schema. Because they didn't extend bool, they just said they did in the comments. When we got back in touch with them, we realized that they had no clue that the stuff not in comments mattered. As far as they knew, XML was just text, and they had clearly specified how it was to be interpreted (in English).
- 10ren 16y agoYou make me wonder if the hate is partly due to XML being used in integration, and integration is difficult and problematic, and vulnerable to all kinds of communication problems. And if JSON tends to be used where integration isn't very challenging (eg. you control both ends, and the data is fairly regular and simple; or one end is entirely determined by the other); that is, where schemas aren't needed.
- crux_ 16y ago> XML isn't bad in and of itself. I'm arguing that it is. Symptoms of badness: version 1.0 of the basic standard is on its 5th edition over ~8 years. Said standard is stupendously huge. Major security/crash & other bugs in pretty much every parser (https://www.cert.fi/en/reports/2009/vulnerability2009085.html https://www.cert.fi/en/reports/2009/vulnerability2009085.htm...) as of less than a year ago. XHTML's abandonment. In short, XML stinks and there's plenty of evidence out there that it does. Please note that doesn't mean I would wish XML away. Widespread adoption, in and of itself, is a killer feature.