Dave's Web -> Computers -> XML

The Power of XML

The entire IT world is abuzz about XML. Still. Over the last 10 years, a raft of paradigm shifts we've heard breathlessly reported as inevitable have evaporated. XML's still with us, important as ever.

Who's talking about it? Microsoft, for example. Steve Ballmer was recently (October, 2002) asked about Microsoft's latest big thing, .Net.:

What is .Net? Well, the benefit of .Net is XML (Extensible Markup Language); it's all about connection. We take the XML connection and we extend it across both client and server--while other guys are only server-focused. It's about connecting people to people, people to information, businesses to businesses, businesses to information, and so on. That is the benefit. What is .Net itself? It's a set of code we ship that users, developers and IT people use to help build applications that process XML information.

There you have it. What is .Net? XML! Why didn't they just say so earlier; they could have saved us all a lot of guessing. (You can find the full interview with Steve Ballmer at ZDNet.)

Bill Gates has characterized .Net as a "bet-the-company" technology (see the full article on ZDNet). Why is Microsoft suddenly hanging its future on XML? Because XML is a no-brainer, for three stunningly simple reasons that even Microsoft would be foolish to miss.

First, XML fills a need we've had for about as long as we've been storing information on computers, by giving us a standard way of arranging data.

Suppose you are writing a piece of software that needs to save state between executions, or should consult a configuration file before it does its work. As the programmer, you can simply establish your own binary file format, perhaps by saving the data as it was stored in the computer's memory at run time. But you'll have no hope of reading it without the code that created the file.

Better yet, you could create an ASCII file that contains the same data in a human-readable form. Traditional Unix config files, such as /etc/passwd or /etc/printcap, follow this tradition. Anyone can use "cat" to examine the contents. However, each file still follows its own conventions: /etc/passwd separates records with newlines and fields with colons; /etc/printcap starts records with a non-whitespace character in field one, then separates fields with colons and indicates datatypes with an equals or a hash sign.

XML eliminates the need for every programmer to invent his or her own file format. Instead of thinking up patterns of white space and semicolons, XML gives us a standard for opening and closing elements with tags, and giving those elements attributes. Rather than wondering what the config file's format might be, we can (as sysadmins or code maintainers) get right to work with a format we all know. XML files are still human-readable, but they are also machine-readable, with a variety of well-understood, off-the-shelf tools.

Second, XML separates content from presentation. With XML, you grant your data its identity. For example, a "title" tag in a list of books marked up with XML informs us unambiguously that the characters it contains constitute the title of that book. This file full of identified data is content.

Presentation is fixing your data's place in the world. Once you know what the title of the book is, what do you do with it? One answer might be "put it in italics after the name of the author," but how you present your data depends on you and your sense of style.

When we want to change the way we present ourselves, but don't care to take on a different identity, we might change our style. Likewise, sometimes we need to dress our data up differently depending on the occasion. XML makes it easy.

Of course, if XML were a Microsoft-only technology, all of these great advantages wouldn't be worth much. To the contrary, XML is entirely standards based. No one company controls XML, and the standards for XML are openly available, free of charge, to all. If .Net were to fail and Microsoft were to (per Gates' prediction) go out of business, XML would be largely unaffected. We'd simply need to use tools for Oracle, Altova, or IBM to process our XML. That's the third reason.

Furthermore, the power of XML outstrips even other vendor-neutral standards. For example, SQL is standards-based, but because of varying choices within that standard and little standardization of APIs, swapping one RDBMS for another is no easy task. Trading in your XML parser, on the other hand, can be quite easy, even trivial. If both parsers follow the same API standard, as set down by the XML standardization processes, you don't need to rework your code to take advantage of a new and improved piece of software.

So, will XML change the world? That depends. Did Ethernet change the world? How about SQL? My prediction: XML will prove, over the 20 years since the first XML draft standard was introduced, to be on par with Ethernet and SQL as a defining technology in computing. It won't have been as important as ASCII, QWERTY, TCP/IP, or the transistor; it will have been more influential than the eMate, Token Ring, or Microsoft Bob.


backward to User Groups --- Up to Computers ---