Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / November 2007



Tip: Looking for answers? Try searching our database.

XML table display using CSS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pradeep - 28 Nov 2007 04:06 GMT
When using CSS to display an XML file as a table, is there a way to
show the element names at the tops of the columns as headers?

For Example :
I have a XML file
<ITEMLIST>
    <ITEM>
        <NAME> Item1  </ITEM>
        <PRICE> 500 </PRICE>
        <QTY> 10 </QTY>
    </ITEM>
    <ITEM>
        <NAME> Item2  </ITEM>
        <PRICE> 600 </PRICE>
        <QTY> 20 </QTY>
    </ITEM>
    <ITEM>
        <NAME> Item3  </ITEM>
        <PRICE> 700 </PRICE>
        <QTY> 25 </QTY>
    </ITEM>
    <ITEM>
        <NAME> Item4  </ITEM>
        <PRICE> 900 </PRICE>
        <QTY> 90 </QTY>
    </ITEM>
</ITEMLIST>

and the output which I want is

------------------------
|     | PRICE  |  QTY  |
------------------------
Item1 | 500    |   10  |
------------------------
Item1 | 600    |   20  |
------------------------
Item1 | 700    |   25  |
------------------------
Item1 | 900    |   90  |
------------------------
Rik Wasmus - 28 Nov 2007 16:05 GMT
> When using CSS to display an XML file as a table, is there a way to
> show the element names at the tops of the columns as headers?

I'd go the xsl route. Much more flexible for XML.
Signature

Rik Wasmus

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.