Summary: This article introduces the 'eXtensible Markup Language' (XML) and tells of it's uses.
What is XML?
XML, which stands for Extensible Markup Language, is a W3C recommended general purpose markup language. XML is a subset of SGML.
Why HTML will not work
HTML markup is a fixed language designed only for presentation purposes, while XML is user-defined and is used to define data content.
HTML is limited to these three areas: intelligence, maintenance, and adaptation. XML is strong in intelligence, adaptation, maintenance, and simplicity.
While XML is different from HTML, the two can be used together along with XSLT.
For an XML document to be correct it must be a well-formed document, conforming to all of XML's syntax rules. Most browsers, including Mozilla, offer a debugger that can identify poorly-formed XML documents.
There are two ways in which XML can be used to aid in presentation, applying to various presentation methods from transforming HTML to creating PDF or image code.
One way to have have a style on an XML page is to use CSS with the
<?xml-stylesheet type="text/css" href="stylesheet.css"?>
In combination with the powerful XSLT, which is capable of transforming XML markup into other forms, XML is incredibly versatile.
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
This article is only a quick introduction to what XML is; for more details about XML, you should look around on the Web for more in-depth articles.
Learning the HTML markup language will help you better understand XML. You should also explore the Mozilla Developer Center for more information.
- Author(s): Justin G. Shreve
- Last Updated Date: May 19th