|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
basic xslt : nodename and nodevalue
How to get the node name and node value of an xml using xslt with out hard coding the node name?
<table> <row> <name>one</name> <id>26</id> <rownum>9876</rownum> </row> <row> <name>two</name> <id>26</id> <rownum>9875</rownum> </row> </table> i want the following format from the above xml, nodename nodevalue table --- row --- name one id 26 rownum 9876 row --- name two id 26 rownum 9875 Regards, PLR.Kannan Last edited by plrkannan : July 17th, 2003 at 05:15 PM. |
|
#2
|
||||
|
||||
|
If you dont't want to use the names I guess you have to use the position of the element in the tree.
Something like: Code:
<xsl:value-of select="name(/*[1])"/> <xsl:value-of select="/*[1]"/> <xsl:value-of select="name(/*[1]/*[1])"/> <xsl:value-of select="/*[1]/*[1]"/> <xsl:value-of select="name(/*[1]/*[2])"/> <xsl:value-of select="/*[1]/*[2]"/> ... Perhaps this will help you |
|
#3
|
|||
|
|||
|
Thank you.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > basic xslt : nodename and nodevalue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|