You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Allison M Santoro <as...@us.ibm.com> on 2001/02/02 22:52:59 UTC

CDATA_SECTION Node

Is it possible to parse the CDATA SECTION node?  On occasion (based on what
has been parsed above this node) it is desiriable to parse the xml in the
CDATA section.  Is there a switch in the parser that would let me do that?
Thank you,
Allison Santoro

Allison M. Santoro
IBM Global Services
580 Walnut Cincinnati, Ohio
513-762-2367 T/L 663-2367


Re: CDATA_SECTION Node

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Allison M Santoro wrote:
> 
> Is it possible to parse the CDATA SECTION node?  On occasion (based on what
> has been parsed above this node) it is desiriable to parse the xml in the
> CDATA section.  Is there a switch in the parser that would let me do that?

No. I'd say CDATA sections are being misused in that case. The sole
purpose of CDATA sections is to ESCAPE parsing. Allowing to parse them
anyway doesn't make sense.

The conditional mechanism you're looking for should really be handled
one level higher than the parser, and be based on "regular" markup.
Specifically, it would be trivial to write a SAX filter that filters out
parts that you want to hide in some cases. You got it backward.

Hope this helps.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group