Easy Tutorial
❮ Home Xml Dom ❯

Using CSS to Display XML


By using CSS (Cascading Style Sheets), you can add display information to XML documents.


Displaying Your XML with CSS?

It is possible to format XML documents using CSS.

Here is an example of how to use a CSS stylesheet to format an XML document:

Take a look at this XML file: CD Catalog

Then look at this stylesheet: CSS File

Finally, see: CD Catalog Formatted with CSS

Below is a snippet of the XML file. The second line links the XML file to the CSS file:

Formatting XML with CSS is not a common method.

The W3C recommends using XSLT, see the next chapter.

❮ Home Xml Dom ❯