|
Microsoft Word Applied xml a toolkit for Programmers Wiley docBog'liq Ceponkus, Hoodbhoy - Applied XML - Toolkit for ProgrammersFigure 2.3:
XML defines a way for all markup languages to be unique yet allows
all of them to be interpreted the same way.
What this means is that if you have a tool that can understand XML, you have a tool that
can understand all other markup languages. The implications and implementations of this
are entirely what this book is about.
Why Not HTML?
In case you’re wondering why, if we’ve already agreed that HTML is a universal method
of exchanging information over the Web, we can’t continue to use it for more complicated
information exchange, the answer lies in the nature of HTML.
HTML was invented with the specific purpose of providing a universal set of tags for
displaying
information. If you take a look at any HTML source code, you notice that it
consists of a finite set of tags (for example,
, , ), each of which provides a
special piece of formatting information about the contents (text) of the tag. Therein lies
the answer. HTML tags only tell you what to make the information they contain
look
like.
They don’t give you enough information to know anything more than that about the
contents. For example, is the content a name, an address, or a chemical formula?
You might think a solution would be to develop more tags that can comprehensively
represent all the information you want represented. Unfortunately, that idea just doesn’t
cut it. It simply won’t work because you cannot create a comprehensive and yet finite
number of tags to represent all kinds of information. What is possible, however, is to
create a finite number of ways of creating tags such that all tags you create are in a
format that is universally understandable. That is what the XML 1.0 specifications seek to
do. XML defines a standard way of creating markup that is simple and
extensible
so you
can use it to richly describe any kind of data. Many applications can then process the
same data in different ways to produce useful information (information, by definition, is
processed data).
In some senses, you could say that XML is a political solution to today’s data
communication problems. However, to simply call it a political solution would be inadequate
and inaccurate. Technologically, it is no mean feat to unite so many fronts, and though
- 25 -
XML is not a ubiquitous solution—yet—it has every potential of becoming one.
|
| |