Consider the following xml fragment:
How do I retrieve the
CDATA sections are just part of what in XPath is known as a text node or in the XML Infoset as "chunks of character information items".
Obviously, your tool is wrong. Other tools, as the XPath Visualizer correctly highlight the text of the Name element when evaluating this XPath expression:
/*/Name/text()
One can also write a simple XSLT transformation:
" "
When this transformation is applied on the provided XML document:
the correct result is produced:
"SomeText"