Displaying XML with CSS
By using CSS (Cascading Style Sheets), you can add display information to an XML document.
Displaying Your XML with CSS?
It is possible to use CSS to format XML documents.
The following example shows how to use a CSS style sheet to format an XML document:
Look at this XML file:CD Catalog
Then look at this style sheet:CSS File
Finally, view:The CD Catalog Formatted with a CSS File
Below is a small part of the XML file. The second line links the XML file to the CSS file:
.
.
.
Formatting XML with CSS is not a common approach.
The W3C recommends using XSLT; see the next chapter.