The Goals of XML at 25: and the one change that XML now needs
I work with XML quite a lot for connecting legacy but also &#x27;modern&#x27; systems, and there are some good parts and some absolutely horrible parts, let me go on a rant for a little.<p>I classify them as sane XML ideas and some as complete utter garbage.<p>Good parts<p>- Schemas for documents - If you have a single schema file, and a single XML to do validation its KINDA nice. If you limit yourself to a basic set of XSD types its okay ish.
- The general idea have XSD&#x27;s express document structure and have a standard for it is kinda nice.<p>Bad parts<p>- people go absolutely bonkers with schemas, have schemas in schemas, do complicated stuff that can hardly be expressed in modern type systems, and even harder to generate code for. Things like PEPPOL or UBL are extreme horrible overly complex solutions, and you need an army of devs that have the patience to implement it properly.<p>As a result, everybody does the bare minimum and gets their own flavour and you&#x27;re still making per supplier code since everyone just tries to make it work. Our code base has a ton of &#x27;fixers&#x27; per supplier to convert their iffy files to something sane. We started by asking them to fix their files but in the end it was just waaaaaay faster if we dealt with it, because the complexity of truly understanding XSD&#x27;s is quite complicated.<p>- The a part of the standards community, feels more like schema designers than actually implementers. It feels like whenever a committee designs a standard they&#x27;re like &quot;WE&#x27;RE DONE!&quot; without actually implementing it themselves across languages and see how hard actually is to generate something valid. These organisations are head-acheinducing money sinks where there bad schema ideas trickle down.<p>- It can basically do too much, what you want is a tiny expression of your types.<p>- JSON Interopability: You can&#x27;t just convert JSON to XML without schema knowledge. In XML this can  `&lt;user&gt;&lt;name&gt;&lt;&#x2F;name&gt;&lt;&#x2F;user&gt;` can either be an item in an array [], or a hash. You need to know the schema to understand how to deserialise or generate properly, you can&#x27;t cheat.<p>- Its super verbose, and hard to read. When you&#x27;re staring at 200 lines of XML, you&#x27;re brain has to parse all the verbose namespaces and what not in order to pick out the data.<p>I also deal with +1GB XML files and then the tooling to support large files grows thin. And you resolve to SAX parsing and emitting nodes. It aint fun. In the end I had to write a lot of tools myself to make it manageable to work with many documents.<p>Anyway thanks for reading this far, I really needed to vent hahaha