RE: [xsl] Using XPath to refer to a tag value which itself is XML content

Subject: RE: [xsl] Using XPath to refer to a tag value which itself is XML content
From: "Robby Pelssers" <robby.pelssers@xxxxxxxxx>
Date: Tue, 5 Jan 2010 09:18:18 +0100
The snippet you sent looks like valid xml ... the only difference I see is you
mention a <RawData> tag with capital D while in the example and in your xpath
query you use a small d.

Robby Pelssers

-----Original Message-----
From: PATIL Arvind [mailto:Arvind_PATIL@xxxxxxxxxxxxxxxxx]
Sent: Tuesday, January 05, 2010 9:12 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Using XPath to refer to a tag value which itself is XML
content

Hi,
I have a XML file content which is added as the value of XML tag.

For eg:
In this xml snippet, value of tag <RawData> is xml content itself.

<root>
<OID>27696.16415.10544.53961</OID>
<Rawdata>
<report><primaryImages><primaryImage><ObjectName>auto_21259132174955</ObjectN
ame></primaryImage></primaryImages></report>
</Rawdata>
</root>

Now, if I use XPath to navigate through this XML content, it does not display
anything.
...
   <xsl:value-of
select="Rawdata/report/primaryImages/primaryImage/ObjectName"/>
...

But, if I use below XPath, it gives the entire XML content.
...
   <xsl:value-of select="Rawdata"/>
...

How should I add such value so that Xpath can consider it as XML?

Thanks
arvind

Current Thread