Whether you're discussing e-commerce, knowledge management, or the Internet
in general, you've likely seen or heard reference to eXtensible Markup Language (XML).
XML is, without a doubt, one of the most heralded technologies to come across the
wire in recent years (pun intended).
What is XML? Why is it creating such a deluge of interest? What should you know
about XML, and perhaps more importantly, why should you even care about it? In this
article, I will provide a high-level description of what XML is (and what it's not),
discuss the key components of an XML document, and provide a compelling argument for
why it's well worth your while to learn more about XML.
To understand XML, it's helpful to compare and contrast it with another technology
with which a great many of us are familiar - HyperText Markup Language (HTML).
If you've used or read about HTML, you know that it was created so that users
could format and display information on the Web. HTML uses a fixed and finite set of
tags, elements, and attributes that allow it to communicate to a user's browser how
that browser should display the document. We see HTML everywhere, and it has for
some time served as the lingua franca for displaying information on the Web. It is a
proven technology that well serves its purpose in most scenarios.
What if, however, the current version of HTML doesn't allow me to do something
that I want to do? I have two choices: I can either write my own browser that
understands my tags (bad idea) or I can put my project on hold for a year or so and
hope that the next version of HTML includes the functionality that I need (even worse
idea). Try selling either of these options to your boss or client and see if you still
have a job by the time you end your discussion. So concludes our one-paragraph, in-depth
investigation of HTML.
Now, if I may lapse into my days of standardized test taking, HTML is to displaying
information as XML is to defining information. They both are text-based, and they both
consist of tags, elements, and attributes. Unlike HTML, however, XML allows users to
structure and define the information in their documents. While technically it is a markup
language (it allows you to use tags to "mark-up" the contents of your document), it
more appropriately is a meta-language.
By meta-language, I mean that it allows users to create their own collection of
tags, elements, and attributes as needed and in so doing to accurately describe the
physical contents of a document. Unlike HTML with its finite collection of tags, XML
allows users to create their own to meet their own requirements (thus the eXtensibility).