-1

friends anyone know how to find one node contain cdata or pcdata as innertext, any one help me.

<link>sample text</link>
<link><![CDATA[cdatacontent]]></link>

In this node link contains both CDATA and PCDATA, how to find difference

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
Karuppa Samy
  • 161
  • 1
  • 1
  • 9
  • Please show a [minimal, complete and verifiable sample of your code](http://stackoverflow.com/help/mcve) - at least a well-formed input XML document, and the exact output you expect. It is [unclear what your problem actually is](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). – Mathias Müller Mar 12 '15 at 10:25

1 Answers1

2

any possible way to solve via xslt ?

No, because they represent the same data.

See here:

Text in a CDATA section looks exactly the same to the XSLT processor as text outside a CDATA section. For example,

<![CDATA[xxx]]> looks exactly like xxx

<![CDATA[<>]]> looks exactly like &lt;&gt;

This is because they are intended to be equivalent ways of writing the same thing.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
michael.hor257k
  • 113,275
  • 6
  • 33
  • 51