OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XPath help

[ Lists Home | Date Index | Thread Index ]


On Nov 11, 2003, at 9:18 AM, Stephen Stone wrote:
> I use "./text()" to return all text nodes from the current node.
> I need to also return all CData sections from the current node.
> I assumed "./cdata()" would work. It does not.
> I know CData sections are dealt with differently. I'm just not sure 
> how.

CDATA sections are not distinct from text nodes in the XPath data 
model, so it all looks like text as far as XPath is concerned.  If you 
want access to CDATA sections separately, you'll have to go lower 
level, e.g., with SAX (http://www.saxproject.org) or with STX 
(http://stx.sourceforge.net/).

Paul
http://blog.fivesight.com/prb/


  • References:
    • XPath help
      • From: "Stephen Stone" <sstone@teltronics.com>



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS