Why the XML Hate?

Every month or so, an anti-XML screed tops the rankings of siteslike Digg. Thousands of users signal their agreement in a deafeningclattering of keystrokes, emboldening the mighty warrior who daresto take on the cure-all, solve-all Goliath that isXML.

XML is an ill-suited, jack-all-all-trades master of noneoverly-complex distortion of SGML!” they proclaim.

But why Why the XML hate?

What did XML ever do to them?

Not All Technical Debates Are Actually About Technology

My cynical side wonders if some of the hate might beinterpersonal issues disguised as technical conclusions.

In the latter half of the 20th century I was cursedwith a pestering colleague — a rather annoying sort who wouldspend weekends and evenings desperately working on a solution totry to outshine my deliverables, always demonstrating his proposalwith the proclamation that he “did it in a few hours“.This colleague suggested that I consider XML as an HTTP-delivereddata stream between our own proprietary systems (an aggregationsystem and field collection systems).

I laughed him off, and began the process of inventing a longlist of reasons why his suggestion was idiotic. “Imagine thebloat of XML!” I thought (sidenote: It would have beenhighly beneficial if the very first XML spec included basic,well-known and well-proven compression as a standard, optionalelement of XML. The SVG spec writers saw thevalue, as has Microsoft with their Office2007 Open XML format. It would have been beneficial if everyparser and library and validator automatically knew how to dealwith compressed XML, without having to shoehorn additional, obvioussteps around it)

Our systems would grind to a halt trying to build and thendeconstruct XML documents on each end!” I worried.

A few months later the project was implemented. It used XML. Theagility that XML brought to both sides of the process offeredconvincing flexibility, and it was certainly the right choice forthat project.

Perhaps I’m projecting, as us humans are prone todo, but I wonder how much of the XML-naysaying was motivated bya coworker or PHB who proposed XML as a cure-all for some corporateneed, instantly creating XML opponents.

Of course I’m not trying to propose that all XML opponents arejust trying to undermine a coworker: There are a lot of people withcarefully thought out, well-supported arguments for their position,and who are opposed to XML being implemented where it would be aterrible decision. It’s just that I think there’s quite a few ofthe former sort as well, making me mildly suspicious when someonecomes out, guns blazing, against XML.

For those on the fence I had considered authoring a detailedexplanation of all of the strengths and weaknesses of XML, butthere are already countless comparisons of that sort already outthere (albeit usually being written to push an agenda that eitherXML is the silver-bullet of software development, or that it’s aterrible mistake that needs to be corrected). Instead I’ll simplyend with a couple of simple points.

  • “XML” is a stack of related technologies. It is the leveragingof layers of this stack (such as the many brilliant,high-performance parsers and authoring tools, and the comprehensiveXSD to document, communicate and validate concise, strongly-typeddocument formats) that presents the greatest benefit of XML.
  • . . .yet you don’t have to use all XML technologies touse XML. You don’t have to touch namespaces, or XSDs, or XQuery, orXPath or XSLT or ISO 8601:2001 or DTDs or any other XML-relatedtechnology to embrace XML. Really. Simply nesting a couple ofelements, and intelligently choosing attributes, really isXML. Really. And it already takes advantage of the tremendousagility the document format offers. Too many XML beginners areturned into adversaries after being presented a seemingly endlessarray of acronyms and languages in the XML gamut, often with solittle specific information that it’s difficult to determine whatholds value for a particular project and what’s just adding noiseto the process.

[This post authored in Word 2007]