What is XML?
XML is a way of making markup languages. A markup language is a way of
taking regular old text and marking certain parts of it as 'special' in
some way.
For example, take a look at this text:
Bristol, EnglandYou probably recognize that that text is talking about a place. But
to someone completely unfamiliar with geography, it's just so much
nonsense. If I wanted to help such people out, I might try to describe
to them why that text is special; for instance, I might say:
Bristol, England is a place.
In other words, I'd tack some extra stuff on to clarify why that
text is special.
XML allows us to do something like that, but instead of adding our
explanation on as parts of English sentences (which are sometimes
imprecise and can therefore be hard to work with---especially using a
computer), we make up
tags that indicate why that text is special, and then wrap the text in
those tags---for instance:
<place>Bristol,England</place><place> is a
tag. It marks the 'Bristol, England' text off as special, and (if we
happen to understand what the tag means---in this case, it's pretty easy
to guess that it's used to mark places) the tag can also tell us
why it's special. A group of such tags that's used together to describe
things can be referred to as a markup language---XML gives you rules for
creating such languages and the tags that go with them. Easy enough?
So, what is XML? Simply a way to describe text. XML is particularly useful to describe text for computers to process
because it can be much more precise than our common, everyday ways of
describing things, but usually people (with some patience) can understand
XML, too.
If you're familiar with HTML, you may be thinking,
"This sounds kind of like HTML to me," and it should. HTML is a markup language that's very similar to
those that follow the XML rules---in fact, the folks that define what HTML
is are the same ones that made up XML, and the newest version of HTML has
been changed to fit the XML rules. This new HTML, called XHTML, is a
language that follows the XML rules---however, the old HTML (with which
many people are most familiar) breaks quite a few of those rules.
If you know HTML, it would be a good idea to find out what the
differences between HTML and XML languages are.