xml| Display
You can use XSL to add display information to an XML document.
displaying XML with XSL
XSL is the XML preferred Format table language. XSL (extensible Format Table language) is much more complex than CSS. One way to use XSL is to convert the XML to HTML before it is displayed by the browser, as in the following example:
Click here to view the original XML file.
Click here to view the same file formatted with the XSL format table.
Click here to view the XSL format table.
The abbreviated version of this file is shown below. Note the XSL reference in the second row:
< XML version= "1.0"?>
< Xml:stylesheet type= "text/xsl" href= "simple.xsl"?>
< breakfast-menu>
< food>
< Name>belgian waffles</name>
< price>$5.95</price>
< description>
Two of our famous Belgian waffles
</description>
< calories>650</calories>
</food>
</breakfast-menu>
For more information about XSL, you can access the W3Schools ' xsl School.
XML in the data island
With Iternet Explorer 5.0, XML can be placed in an HTML page embedded in the data island.
embedding XML into HTML
Embed XML data in HTML with an informal < xml> tag. You can embed XML data directly into an HTML page, like this:
< XML id= "NOTE" >
< note>
< to>tove</to>
< from>jani</from>
< heading>reminder< Body>don ' t forget me this weekend!</body>
</note>
</xml>
Or embed a separate XML file:
< XML id= "note" src= "Note.xml" >
</xml>
Note the < xml> tag is an HTML element, not an XML element.
Data binding
You can bundle a data island into an HTML element, such as an HTML table. In the following example, an XML data island with an ID of "Cdcat" is loaded recently from an external XML file. Bind the data island to an HTML table with a data source attribute, and then bundle the XML data into tabular data elements using a range of data field properties.
< html>
< body>
< XML id= "Cdcat" src= "Cd_catalog.xml" ></xml>
< table border= "1" datasrc= "#cdcat" >
< tr>
< td>< span datafld= "artist" ></span></td>
< td>< span datafld= "title" ></span></td>
</tr>
</table>
</body>
If you are running IE 5, you can try it yourself. You can also use IE 5.0 to view external XML files. You can also use this example, demonstration < Thead>, < tbody> and < tfoot>.