I have the below code. I want to link the XML code to a style sheet, and display the data in a table. I have linked to the style sheet but how do I display the XML data in a table?
<!DOCTYPE products SYSTEM "support.dtd">
<?xml-stylesheet href="style.css"?>
<products>
<product>Widows XP</product>
<product>Windows Vista</product>
<product>Windows 7</product>
<product>Windows Server 2003</product>
<product>Windows Server 2008</product>
<product>Debian Linux</product>
<product>RedHat Linux</product>
<product>VMware Virtulization</product>
<product>Microsoft Hyper-V</product>
</products>
To display the given data in a table, use
products { display: table; }
product { display: table-cell; }
This displays the data as a one-row table. To add borders around cells, for example, add
product { border: solid 1px; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With