In the previous section we explained how to use CSS to display XML, in this section we will introduce a better way to display XML.
By using XSLT, you can convert XML documents into HTML format.
XSLT is the preferred XML stylesheet language.
XSLT (eXtensible Stylesheet Language Transformations) is far more complete than CSS.
XSLT converts the XML file into HTML before the browser displays it:
Display XML using XSLT
If you want to learn about XSLT, find XSLT tutorials on our home page.
In the above example, the XSLT transformation is done by the browser when it reads the XML file.
Different browsers may produce different results when using XSLT to transform XML. To reduce this problem, XSLT transformation can be performed on the server.