The trouble with XML has never been XML itself.
It was also about how easy it was to generate great XML.
Because it is complicated and everyone doesn't really agree on how to properly representative an idea or concept, you have to deal with varying output between producers.
I personally love well formed XML, but the std dev is huge.
Things like JSON have a much more tighter std dev.
The best XML I've seen is generated by hashdeep/md5deep. That's how XML should be.
Financial institutions are basically run on XML, but we do a tonne of work with them and my god their "XML" makes you pray and weep for a swift end.
Maybe rather: how easy it was to generate rotten XML. I feel you there.
The XML community, though, embraced the problem of different outputs between different producers, and assumed you'd want to enable interoperability in a Web-sized community where strict patterns to XML were infeasible. Hence all the work on namespaces, validation, transformation, search, and the Semantic Web, so that you could still get stuff done even when communities couldn't agree on their output.
Surely this is a product of the fact that XML is just more extensible (it’s in the name after all).
If you tried to represent the data (exactly) from any of the examples in the post, I think you’d find that you’d experience many of the same problems.
Personally, I think the problem with XML has always been the tooling. Slow parsers, incomplete validators