Please visit our sponsors !
Displaying XML with CSS
With CSS (Cascading Style Sheets) you can add display information to an XML document.
Displaying your future XML files with CSS?
Will you be using CSS to format your future XML files?
No, we don't think so! But we could not resist giving it a try:
Take a look at this pure XML file: The
CD Catalog
Then look at this style sheet: The
CSS file
Finally, view: The
CD Catalog formatted with the CSS file
Here is a fraction of the XML file, with an added CSS stylesheet reference:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="cd_catalog.css"?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
.
.
.
.
</CATALOG>
|
We DO NOT believe that formatting XML with CSS is the future of the Web.
Even if it looks right to use CSS this way, we DO believe that
formatting with XSL will be the new standard (as soon as the main browsers support it).
Creating your future Homepages with XML?
Will you be writing your future Homepages in XML?
No, we don't think you will! But we could not resist giving it a try :
A
homepage written in XML.
We DO NOT believe that XML will be used to create future Homepages.
We DO believe however, that XHTML - HTML defined as XML will do the trick:
Please, read our
XHTML tutorial.
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|