XML refers to a couple of different things. The first is that XML is a markup language and
data format much like HTML. One of the most popular examples of this is RSS.
The second is that XML is a paradigm for creating markup languages.
At the time when XML was being created, it was believed by many (including myself) that XML would
be a way for web developers to create new tags and elements for HTML. This turned out to be a somewhat naive
view of XML. Coming from that point-of-view, it seems that XML turned out to be a way of creating alternates to HTML.
(Although that is NOT a completely accurate way of thinking about XML.)
Today XML has found much popularity as a way of developing interchange formats; as a platform and paradigm neutral way
of communicating; and as a language for creating languages.
Some have argued that XML is unneeded. That all one needs to do is use Semantic HTML such as Microformats.
And although I believe that the use of Semantic HTML is powerful; I believe that it is NOT a good replaced for XML.
The reason for this is that parsing Semantic HTML is much much more complex than parsing XML. Which means that
although a beginner could create a (wrong but working) XML parser,... a begineer would have great difficulty creating a
Semantic HTML parser. The learning curve to create a Semantic HTML parser is much much steeper than the
leaning curve for parsing XML.
Because of this I believe that in many situations XML is a better choice than Semantic HTML because XML
allows for quick adoption of many kinds of technologies based on it (because of the ease with which parsers can be written). Having said that,
however, there still are many many situations where Semantic HTML it the better choice. (These are situations where developers do NOT
have to write parsers to parse the Semantic HTML. Many of these could be characterized by calling them in-browser technologies.