|
|
Yeah, it's the "ML" thing that's confusing you.
HTML has a sole purpose: to be interpreted by a browser.
XML is used by a huge variety of applications. The latest Microsoft Office file format is basically a custom-form of XML. So is an RSS feed. So are many other file formats.
XML is a set of rules for producing files; it's not a set of rules for making files for one application. So I couldn't read an Office file in my RSS reader, even though they're both using XML - they use entirely different tags.
The joy of XML is that it can describe any data that can be categorised - FOAF, RSS, contact information, magazine contents - can be represented in it. The XML file doesn't need to explain how the tags within it are to be used - the software at the other end does.
Of course, the other thing you can do is make an XML file display correctly in a browser; I believe this uses XSLT but I'm not very up on that... from what I know, I think it allows XML tags to be mapped to HTML tags.
And, of course, then there's XHTML, which is the beginnings of the cross from HTML to XHTML. You know how at the beginning of an HTML file, there's a namespace defined? That points to a DTD file on the web that defines what all the XHTML tags mean. Namespaces allow you to explain how an XML file should be understood.
So basically, XML is much like HTML, in that it's a markup language - for marking up content by describing it in tags. The difference is it's not necessarily presentational, visual, or even for people to read.
(Anyone who wants correct me, feel free) |
|
|