XML XSLT Table display

I have a following XML file
<ITEMLIST>
<ITEM>
<NAME> Item1 </ITEM>
<PRICE> 500 </PRICE>
</ITEM>
<ITEM>
<NAME> Item2 </ITEM>
<PRICE> 600 </PRICE>
<LOCATION> XYZ</LOCATION>
</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 want to display in HTML like following

-------------------------------------------
| | PRICE | LOCATION | QTY |
-------------------------------------------
Item1 | 500 | | |
-------------------------------------------
Item1 | 600 | XYZ | |
-------------------------------------------
Item1 | 700 | | 25 |
-------------------------------------------
Item1 | 900 | | 90 |
-------------------------------------------


Is it possible via XSLT to do this ...If yes, kindly provide a small
code snippet to do this
pradeep [ Mo, 07 Januar 2008 04:45 ] [ ID #1902246 ]

Re: XML XSLT Table display

Pradeep wrote:
> I have a following XML file
> <ITEMLIST>
> <ITEM>
> <NAME> Item1 </ITEM>
> <PRICE> 500 </PRICE>
> </ITEM>
> <ITEM>
> <NAME> Item2 </ITEM>
> <PRICE> 600 </PRICE>
> <LOCATION> XYZ</LOCATION>
> </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 want to display in HTML like following
>
> -------------------------------------------
> | | PRICE | LOCATION | QTY |
> -------------------------------------------
> Item1 | 500 | | |
> -------------------------------------------
> Item1 | 600 | XYZ | |
> -------------------------------------------
> Item1 | 700 | | 25 |
> -------------------------------------------
> Item1 | 900 | | 90 |
> -------------------------------------------
>
>
> Is it possible via XSLT to do this ...If yes, kindly provide a small
> code snippet to do this
>
>
You must not have googled too hard. This was the first hit I got:

<URL: http://www.devpapers.com/article/312 />

Go read the XSLT resources. Either online or buy a book.

Jeff
jeff [ Mo, 07 Januar 2008 09:44 ] [ ID #1902269 ]
Miscellaneous » alt.html » XML XSLT Table display

Vorheriges Thema: world's worst promo site?
Nächstes Thema: Update to my old 3 column layout template