|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] looping the attributes
Hello,
I'm trying to display the whole xml data in a table in a generic way.
I don't know the name of the fields, all I know is the name of the node.
Here is an example
<root>
<line c1="1" c2="2" />
<line x1="A" x2="B" />
</root>
I'm looking to produce the following output
<tr>
<td> 1 </td>
<td> 2 </td>
</tr>
<tr>
<td> A </td>
<td> B </td>
</tr>
here is my xsl code below, does anyone knows what am I missing ?
...
<xsl:for-each select="line">
<tr>
<xsl:for-each select="@*">
<td> <xsl:value-of select="@name()"/> </td>
</xsl:for-each>
</tr>
</xsl:for-each>
...
Please help
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








