I have a XML which has an element that hold a xml fragment within a CDATA, something like:
<node><![CDATA<root><child val="1"></child></root>]]></node>
now I need to parse this xml and get the value of "val" attribute.
I have to use XSLT for this parsing. The problem is that normal xslt:copy-of select
or xslt:value-of select
is giving the value of "node" element with Type Text, which can not be parsed using XPATH. i've tried something like:
<xslt:variable name="NodeValue"><xslt:copy-of select="//node" /></xslt:variable>
and try to retrieve the value:
<xslt:value-of select="msxsl:node-set($NodeValue)/root/child/@val />
Please help me out if you've any other idea.