Readability of XML

» 09 April 2003 » In Rants, Tech »

Today I was reading an article in Dr. Dobb’s Journal entitled “XML & Relational Databases”. It discusses the advantages of presenting the SQL query results in an XML format, due to better abstraction, clearer presentation of hierarchical relationships, platform independence, and human readability. Wait just a second, human readability?
This brings up a pet peeve of mine. Don’t get me wrong, XML is a good, flexible format and has many uses, but why must every XML-related article tout the fact that it can be read by mere humans? What is the inherent advantage of this “feature”? Not only does it increase the space required to store the XML documents, but the XML processors must deal with the larger amount of data, which must affect performance on some level. Who benefits? Companies making storage solutions and processors.
There has to be a better way. I don’t peruse low-level machine code, so why should the computer be stuck with handling the verboseness of XML? Equality for all, I say. There should be a compiled version of XML that the software can work with natively, and if a human needs to look at that data, well, they can just run an XML viewer or editor. To respond to expected arguments of “with plain-text XML you don’t need a special viewer or editor”: that’s fine, keep your config data or whatever else in XML, the software should be smart enough to compile it automatically. But it’s silly to have two computers communicating with each other via human-readable XML files (think SOAP), even if they are compressed — generate XML, compress, send, receive, uncompress, parse, process. There are definitely superfluous steps there.
And now Microsoft says that the next generation Office will store everything in XML. Well, okay, but what I am really going to do with plain-text multi-megabyte documents living on my hard drive, except using them in Word? Open them in Notepad and admire the hierarchical structure? Give me a break. Compile them instead. Leave the space for more MP3s – a format, mind you, that doesn’t use musical notation for storage.

Trackback URL