The lost art of XML
Preamble There exists a peculiar amnesia in software engineering regarding XML. Mention it in most circles and you will receive knowing smiles, dismissive waves, the sort of patronizing acknowledgment reserved for technologies deemed passé. “Oh, XML,” they say, as if the very syllables carry the…
https://marcosmagueta.com/blog/the-lost-art-of-xml/
There exists a peculiar amnesia in software engineering regarding XML.
XML was not abandoned because it was inadequate; it was abandoned because JavaScript won. The browser won. And in that victory, we collectively agreed to pretend that a format designed for human readability in a REPL was suitable for machine-to-machine communication, for configuration, for anything requiring rigor. We relinquished the logical formalism for convenience with our tools.
It looks “heavy” compared to JSON’s minimalism. These are aesthetic complaints dressed up as engineering concerns.
JSON, by contrast, is an object literal from JavaScript. It is a notation for initializing dictionaries. It was never designed to be a data interchange format; it was promoted to that role because it was already in the browser and developers were already familiar with it. Convenience over correctness.
A format can be pleasant to work with and still be fundamentally inadequate.
We could have just used XML.
We could have simply used the binary XML encodings that already existed. But that would require admitting that XML was right all along.
I am tired of lobotomized formats like JSON being treated as the default, as the modern choice, as the obviously correct solution. They are none of these things.
Sometimes the old way was the right way. This is one of those times.
We threw away schemas, namespaces, validation, self-description, all because we didn’t like angle brackets.