When I started my career, XML was ubiquitous. The meta-information in a Java JAR file — the manifest — follows a proprietary format. But Java EE designers built it from the ground up on XML: meta-information of all artifacts is in XML format e.g. web.xmlejb-jar.xmlapplication.xml, etc.

Java EE is one example I experienced personally. But XML was everywhere in the enterprise world at the time. Its prevalence manifested itself in two areas: configuration and data transfer.

Ever since then, it would be an euphemism to say XML has been losing in popularity. Other formats, such as JSON and YAML, have replaced it in the hearts of developers. In this post, I’d like to:

  • Explore some of the reasons why the mighty XML has fallen
  • Raise some downsides of the popular alternatives
  • And describe how XML already solved those problems

The downfall of XML

I think there are several reasons that led to the downfall of XML. It’s not a single one, but the conjunction of them that led to the current state.

Associated with “Enterprise”

I’m afraid the worst flaw of XML is its close association with the enterprise world. As everybody knows, Enterprise is notoriously bad — by definition: bloated, heavy, not nimble, etc. And yes, that’s sarcasm if you wondered.

In general, perception trumps truth. Developers are no different in that regard. In the end, that’s how Hype-Driven Developers — and most developers, perceive XML nowadays.

#yaml #data-exchange #configuration #json #xml

In Defense of XML
1.10 GEEK