With CSS (Cascading Style Sheets) you can add display information to an XML document.

Displaying your XML Files with CSS?

It is possible to use CSS to format an XML document.

Below is an example of how to use a CSS style sheet to format an XML document:

Take a look at this XML file: The CD catalog

Then look at this style sheet: The CSS file

Finally, view: The CD catalog formatted with the CSS file

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

…for More details Click on More Button

<?xml version="1.0" encoding="UTF-8?>
<?xml-stylesheet type="text/css" href="cd_catalog.css"?>
<TITLE>Empire Burlesque</TITLE>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>

Formatting XML with CSS is not the most common method.

W3C recommends using XSLT instead.

This entry was posted in   XML.
Bookmark the   permalink.

Admin has written 171 articles