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 markup language for general purpose. XML is also a subset of SGML.
Why HTML Will Not Work
HTML markup is a fixed language, and HTML is for presentation purposes only, where as XML is defined by the user and for content purposes.
HTML is limited to these three aspects: intelligence, maintenance, and adaptation. Where as XML is strong in: intelligence, adaptation, maintenance, and simplicity.
XML is also different from HTML, as HTML is for presentation markup, and XML is for general markup. The two could be used together along with XSLT.
For an XML document to be correct it must be a well-formed document, which conforms to all of XML's syntax rules. Most browsers, including Mozilla offer a debugger that will often tell about non well-formed documents that it will view or read.
There are two different ways that XML can be used for presentation, and this can range from transforming to HTML, to creating PDF or image codes.
One way to have have a style on a XML page is to use CSS with the xml stylesheet declaration.
<?xml-stylesheet type="text/css" href="stylesheet.css"?>
Or with the powerful XSLT, which is capable of transforming XML markup into any number of things, the possibilities are almost endless.
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
Read up on other XML guides and refresh yourself on the syntax rules, remember that this guide was a short introduction guide to those new with XML or markup languages.
You should learn the HTML markup language for a better understanding of XML, or to read any number of the guides, found here on developer.mozilla.org.
- Author(s): Justin G. Shreve
- Last Updated Date: May 19th