I'm using xsl to parse an xml document. It's a bit rediculous, but part of the xml is escaped and there's currently nothing I can do about it.
I want to be able to read it as:
And be able to parse the nodes id and name. Any ideas on how to do this?
I tried the following, but it didn't work:
When I try to treat the variable $test as a node, I get the error:
"Reference to variable or parameter 'test' must evaluate to a node list."
Any ideas?
- tleish
Code:
<parent>
<child>
<id>1</id>
<name>Test</name>
</child>
</parent>
Code:
<parent>
<child>
<id>1</id>
<name>Test</name>
</child>
</parent>
I tried the following, but it didn't work:
Code:
<xsl:variable name="test">
<xsl:value-of select="child" disable-output-escaping="yes" />
</xsl:variable>
"Reference to variable or parameter 'test' must evaluate to a node list."
Any ideas?
- tleish