XML, like its heavier brother SGML, has three objectives:
- Separate content from presentation
- Allow for extensibility
- Provide a method to ensure document validity
SGML was developed by Goldfarb, Mosher and Lorrie (before it was
standardized known as GML - their initials) at IBM to manage legal
documents. They found that all legal documents had similar sections. But
of instead of creating a system that only recognized legal documents, they
created a system that allowed people to create their own tags. Good thing
too because Tim Berners-Lee needed to do that in order to create HTML. HTML
is such a popular SGML application that most folks don't know they are using
SGML. While SGML was powerful enough to create the Web, it's really too big
to use on the Web, enter XML. XML is just a slimmed down version of SGML
that shares the same goals and remains fairly compatible.
Part of your issue is that you are a web master and your whole universe is
the web browser. It's a big world out there. There is a lot of information
locked up in web pages that would be useful to other data consumers: PDAs,
Cell Phones, Appliances, Phone Switches, Automobiles, business systems or
paper (yes, you remember plain old paper, don't you?) HTML is all about
presentation in that most of the tags describe how to present the data.
Unfortunately, this doesn't tell us much about the data and this has made
searching the web more of an art than science. Search the web for the word
"Clinton" and you'll get references to cities, rivers, a former president,
and invariably some porn sites. Now if you could only search elements like
<president> then you could reduce your results to William Jefferson Clinton.
(Well, and maybe a few porn sites...) So while XHTML serves your purpose of
maintaining a web site, there are others who need to create several manuals
from the same data or interfaces between disparate systems.
You mentioned databases. You're using a database to separate your content
from your presentation and that's good. But you are "locked in" to certain
vendors. Despite the ubiquitous nature of SQL, one still must have the
correct drivers to get to the data. While XML can be a text file, it can
also be a text stream. Wouldn't it be nice not to care if your data is in
Oracle, or SQL server or MySql? Many databases can return results sets as
an XML text stream. One could switch database providers without any changes
to your web application. You are also formatting with ASP which is great
while you're running Windows (or buy a 3rd party product) but if your one
vendor decides to changed ASP significantly, you will be left with a lot of
work or left in the dust.
So why is XML better? If one can allow people to get the same information
from a touch-tone phone, or from a partners inventory system or a very
up-to-date product spec while they maintain the web site, wouldn't that be
great? While the Web is big, there's a whole other world that can leverage
this publication of data. If one takes a higher view, one can takes
advantage of this data using XML much more easily than trying to pull it out
of XHTML and DIV tags. Briefly, that's it.