
The XML-Men Saving the world from evil mutant data!
Posted Wednesday, Aug. 23, 2000, at 3:00 AM ET
Today your Web browser speaks XML, tomorrow your cell phone will—with your television, car, and doorbell set to follow. Although XML is about as banal a technology as can be imagined, every geek in the world believes XML will become utterly pervasive and change the world. Why all the Xcitement?
XML (extensible markup language) is simply an agreement among programmers about how to represent and exchange data. (Yawn.) In computerese, such an agreement is called a standard. If you've ever tried to import a WordPerfect file into Microsoft Word without the right filter, or beam your phone number from your PalmPilot into somebody's Pocket PC, you've already experienced the frustration of life without standards. It's maddening, it cuts into productivity, it costs money, and it's got to stop. The cure is XML, the programmer's new lingua franca. (Full disclosure: Microsoft, which owns Slate, is backing XML to the hilt with its Microsoft.NET initiative. But so is IBM, Microsoft's arch-rival. Standards make for strange bedfellows.)
XML is related to HTML (hypertext markup language), the very simple standard language for Web pages introduced by Tim Berners-Lee in 1991. HTML can lend additional meaning to the text displayed in a document, specifying the type size and color of text—and whether or not it blinks. But the XML standard, which is governed by the same nonprofit that governs HTML standards, makes it possible to provide an almost infinite array of additional information. Does this block of numbers represent figures from a database or is it baseball batting averages? Does this block of text denote the name of a person or a city? With XML, you can add that additional information and much, much more.
To understand how XML does its magic, let's look at some raw HTML and see how it works. (You can look at the raw HTML of any Web page by clicking View on your browser bar, and then clicking Source or Page Source.) For example, the HTML snippet "<EM>Read Slate </EM>" would indicate that the text between the <EM> "tags" should be emphasized and make it appear in italics like this—Read Slate—when viewed with the graphical browsers from Netscape and Microsoft.
XML tags, on the other hand, make the document smart by indicating what the words mean. For instance, an XML-based inventory file at a car dealer might list a 1999 black Chevrolet Corvette like this—
<YEAR>1999</YEAR>
<COLOR>black</COLOR>
<MAKE>Chevrolet</MAKE>
<MODEL>Corvette</MODEL>
—so any device or application reading the file could use its own rules to display the data to suit the user. I say "might" in this example because XML is so general-purpose that the tags are not yet universal. One car manufacturer might use the tag <MODEL> and another the tag <CAR-MODEL>. But once the car industry finally agrees on standard tags (called a vocabulary) to describe all salient automotive details, every manufacturer, dealer, and consumer will be able to tap XML to sell and buy cars more efficiently. A buyer could use an XML-enabled shopping bot to solicit online bids from hundreds of different dealers and individuals for the precise car he wanted—say, a white 1996 Mazda MX-6 with a V-6, a five-speed transmission, and leather interior but less than 50,000 miles.
Slate already uses XML extensively, assigning Slate-specific XML tags to each part of an article (headline, subhead, author, date published, footnote, etc.). This makes it easy to build an HTML page for the general Web audience. But by manipulating that XML file with a simple software program, Slate builds a text e-mail document that deletes the illustrations and ads but preserves the context of the headline, subhead, author, and body of the article. Similarly, Slate uses XML to produce an eBook version for the Microsoft Reader, a version of the Today's Papers for PalmPilots and Pocket PCs, and audio files that speak to the reader. If a popular new medium emerges—skywriting for example—Slate could simply buy a copy of XML SkyWriter 1.0™ and inscribe its stories on the skies. (To view the XML version of a recent Slate "Sports Nut" column, click here.)
Standards tend to build on standards, and a whole slew of them have emerged that build on or support XML. For instance:
- XSL ("extensible style language") files give readers near complete control over how their computers display XML files. Using XSL, a future version of Slate could allow readers to configure their browsers to display stories in the font, text size, and line spacing they want, not the one our design director has chosen.
- The XML-based standard called SOAP allows computers to communicate directly. Slate could use SOAP to keep a story about the economy eternally up to date by automatically reaching across the Internet via SOAP for the ever-changing numbers from a U.S. government budget database.
- VoiceXML is a standard for vocal communication to and from computers. When you call up the library and ask a computer to read you an article, VoiceXML will be smoothing the way.
Programmers have always wanted to make data move seamlessly from application to application, from device to device, and from organization to organization, but until XML we just couldn't learn to get along. By toppling this tower of Babel, the superheroes of software have laid the groundwork for your GPS navigation system to converse with your address book, your VCR to maintain a working relationship with your calendar, and your cell phone to boss your thermostat around. All Praise XML, the file format that will save the world!
Hitchens: How Iraqi Oil Could Change Everything in the Middle East
The Perfect Gift for the Policy Wonk in Your Life
Wait, the Whig Party Is Making a Comeback?
The Copenhagen Climate Conference Is Really Freaking Out My 9-Year-Old
Is Health Care Reform Without a Public Option Better Than Nothing?
The Unspeakably Raunchy English Sex Clubs of the 18th Century












Reader Comments from The Fray:
XML is never going to be a standard. The main problem with HTML is the proprietary tags that all browsers use. Every browser has its own tags that are supposed to make a "killer" site. I have four browsers on my desktop (the four most popular web browsers to be used to see my site) and every time I make a page, I have to change something to make it look right in all of them (usually a watered-down version). You think Microsoft, AOL/Netscape, Opera, etc will sleep together peacefully in the same bed? Please. If XML is suppose to be this unified standard, they could have done that with HTML, C, Java, etc. Watch and see Bluetooth get fragmented into pieces. Standards are like laws, they are made to be broken. That's why our jails are overpopulated.
--gcat10
(To reply, click here.)
The article states: "But once the car industry finally agrees on standard tags…" Which sounds very simple. But if it's this easy, why haven't Microsoft and WordPerfect/Novell/Corel managed to come up with a common file format for word processing documents? Because they don't want to. And please don't tell me it's because XML is so new. It isn't. XML is a simplification of SGML which has been an ISO standard since 1986.
Another misconception, is that XML is related to HTML. It isn't. XML is a meta-language. It can be used to describe markup languages, such as HTML. The only relationship is that XML is derived from SGML, and HTML was originally described using HTML (all W3C specifications still use SGML, a new version of HTML 4.0, XHTML, is described using XML).
Now, XML is interesting. Just not for what's been described. For instance, Slate could be written in a Slate-specific markup language (SlateML?), described using XML. Then, style sheets, transformation-languages and the like can be described, still using XML, and automagically generate pages in HTML, DHTML, WML (WAP) etc. on demand, depending on whatever technology the readers were using. Write once, publish on all platforms instantly.
--blirp
(To reply, click here.)
[Note from the Fray Editor: Automagically. What a great word. Please don't tell us if it was a typo for automatically. It is the reason the post was chosen for promotion over this, also very interesting, offering from Dan Kloke who is also excited about XML "for none of the reasons mentioned in the article". There was some discussion of the Microsoft connection from Mr Kloke and others.]
(8/23)