f you've been reading any of the headlines you'd think that XML is the greatest invention since auto-start coffee makers. It's being touted as the wave of the future and the greatest, newest invention.
But with auto-start coffee makers, you wake up and pour your coffee. The benefits are clear and obvious.
With XML, the immediate benefits aren't quite so clear. By itself XML doesn't do anything except idenfity pieces of your document—but what makes it exciting is how having "smart" documents can help you work smarter too.
In this QuickStart you'll learn what XML is all about, and what you can do with it.
What Is XML?
XML is a way of adding intelligence to your documents. It lets you identify each element using meaningful tags and it lets you add information ("metatdata") about each element.
XML is very much a part of the future of Web, and part of the future for all electronic information.
Here's the formal definition from the World Wide Web Consortium (W3C):
"The extensible markup language (XML) is a subset of SGML.... It's goal is to enable generic SGML to be served, received and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML."
In other words:
XML—eXtensible Markup Language—is a way to put structure and metadata into your Web page, and make your information smarter and more powerful.
XML is a syntax for marking up data and it works with many other technologies to display and process information. It looks and feels very much like HTML.
XML isn't going to replace everything else you've already learned; it complements it and extends it.
What's the Fuss About?
XML lets you make documents smarter, more portable, and more powerful—that's the promise of XML and that's what all the fuss is about.
XML allows you to use your own tags to define parts of a document. You can do this because XML is a descriptive, not a procedural, language. That is, XML describes what something is rather than performing an action.
For example, take a look at the front page of a newspaper. You'll see different font sizes, different sections, and columns.
If you were to create a Web page for that newspaper—using the same formatting and styles—:you would use tags such as <H1> and <font color="red"> to define the size and color of a large headline, or <i>to italicize a word such as a byline, in order to distinguish it from the rest of the text.
But just try to write tags that actually explain that you've got a Headline and that the words "John Smith" make up a byline. HTML won't know what you're talking about if you create tags such as <Headline> or <byline> or <advertisement>.
XML, with help from other technologies such as CSS, understands what the elements are and how to display them.
That means, in the future, when you're searching on the Web for say, a Barbie doll for your niece's birthday, you'll get Barbie the DOLL instead of some other type of Barbie, because the Barbie doll page might be marked up like this:
Pretty cool, huh?
XML documents can be moved to any format on any platform—without the elements losing their meaning. That means you can publish the same information to a Web browser, a PDA, or a network-enabled bread machine and each device would use the information appropriately.
The most important thing to remember about XML, though, it that is doesn't stand alone. It needs other technologoies, like CSS, in for you to see its results.
If all of this seems like a pain, and you don't want to mess with XML, it's OK. You don't need it to make a great Web page. But you never know when organization will come in handy.