Next in thread → Next in month →

Re: [xml-dev] XPath help

From
Jonathan Robie <>
To
Stephen Stone <>,
Date
2003-11-11T15:26:24Z
ID
<>
Thread
Re: [xml-dev] XPath help
At 10:18 AM 11/11/2003, Stephen Stone wrote:
>I need to also return all CData sections from the current node.

XPath does not give you a way to do this.

Here's what CDATA sections do, according to the XML Rec:

>[Definition: CDATA sections may occur anywhere character data may occur; 
>they are used to escape blocks of text containing characters which would 
>otherwise be recognized as markup. CDATA sections begin with the string 
>"<![CDATA[" and end with the string "]]>":]

So in XQuery, the purpose of a computed CDATA constructor would be to 
escape text that contains characters which would otherwise be recognized as 
markup. Once you get these characters past the parser, they are just 
characters, and the XPath data model does not preserve the boundaries of a 
CDATA section (nor does the XML Information Set).

Jonathan
Next in thread → Next in month →