Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this FAQ
The XML FAQ — Frequently-Asked Questions about the Extensible Markup Language
Section 2: Existing users
Q 2.3: Should I use XML instead of HTML?
Yes if you need robustness, accuracy, and persistence.
XML allows authors and providers to design their own document markup instead of being limited by HTML. Document types can be explicitly tailored to an application, so the cumbersome fudging and poodlefaking that has to take place with HTML becomes a thing of the past: your markup can always say what it means. Trivial example:
<date YYYY-MM-DD="2005-12-26">last Monday</date>
Information content can be richer and easier to use, because the descriptive and hypertext linking abilities of XML are much greater than those available in HTML.
XML can provide more and better facilities for browser presentation and performance, using XSLT and CSS stylesheets;
It removes many of the underlying complexities of SGML-format HTML (which led to them being ignored and broken) in favour of a more flexible model, so writing programs to handle XML is much easier than doing the same for all the old broken HTML.
Information becomes more accessible and reusable, because the more flexible markup of XML can be used by any XML software instead of being restricted to specific manufacturers as has become the case with HTML.
XML files can be used outside the Web as well, in existing document-handling environments (eg publishing).
If your information is transient, or completely static and unreferenced, or very short and simple, and unlikely to need updating, HTML may be all you need.