XML is a classic political compromise: it balances the needs of man and machine by being equally unreadable to both.
- Matthew MightXML is a markup format, a regularization/minimization of the syntax of SGML. It's good at being a markup format—the paired named open+close tags allow for corrupted-stream repair in a way that e.g. Markdown just doesn't. XML is great in, say, DocBook.
But XML gets used for pretty much everything except actual markup. And for everything else, it's not solving those problems well.
Then it has 3 different sets of data, elements, attributes, content. In other words <a c="foo">bla<b/>bla</a> is mess to deal with. Now replace the "bla" with spaces and assume <a> is supposedly only supposed to have <b> as a child except really it will have 3 children, the one before the <b> and the one after.
I think this is why JSON won over XML. It seems like all those extra features on XML would be a benefit but in reality they just give you more places to hang yourself.
The hierarchy stuff is so complicated and wrong that I've personally never witnessed a collegue actually using a data schema. Which means data does not actually get validated.
On top of that it is near unreadable. Compare to something simple like http://jstimpfle.de/projects/wsl/world_x.wsl.txt
The whitespace situation is really bad and makes it all also not canonical at all.
The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.
XML is like violence: if it doesn’t solve your problem, you aren’t using enough of it. XML is like violence. Sure, it seems like a quick and easy solution at first, but then it spirals out of control into utter chaos. Most xml i’ve seen makes me think i’m dyslexic. it also looks constipated, and two health problems in one standard is just too much. Nobody who uses XML knows what they are doing.