XPath selection from path in XML content
Posted
by Wayne Robinson
on Stack Overflow
See other posts from Stack Overflow
or by Wayne Robinson
Published on 2010-05-11T00:01:04Z
Indexed on
2010/05/11
0:04 UTC
Read the original article
Hit count: 217
I have the following XML:
<root>
<name>The name</name>
<long>
<path>
<value>Some Value</value>
</path>
</long>
<field>/root/name</field>
<field>/root/long/path/value</field>
</root>
and I want to select these paths in the field tags however, when I try the following:
<xsl:value-of select="/root/field[1]" />
all I get is the text value of the field. Is there a way of selecting the correct node from those values?
© Stack Overflow or respective owner