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—
—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.
TODAY IN SLATE
Don’t Worry, Obama Isn’t Sending U.S. Troops to Fight ISIS
But the next president might.
Amazon Is Officially a Gadget Company. Here Are Its Six New Devices.
The Human Need to Find Connections in Everything
It’s the source of creativity and delusions. It can harm us more than it helps us.
How Much Should You Loathe NFL Commissioner Roger Goodell?
Here are the facts.
The Plight of the Pre-Legalization Marijuana Offender
What should happen to weed users and dealers busted before the stuff was legal?