[XOM-interest] How to preserving CDATA Section when use Serializer ?

Tatu Saloranta cowtowncoder at yahoo.com
Sat Nov 17 11:59:07 EST 2007


--- Jin Xu <xujin.net at gmail.com> wrote:

> How to preserving CDATA Section when use Serializer,
> please ?

First question usually is "why?" CDATA is just a
convenience feature, allowing users to manually
'disable' quoting of contents. It makes no semantic
difference, and systems working on xml should not care
either way. So there should not be much need to output
CDATA.

But if you must get output as CDATA, you need to
probably both create a custom serializer (I don't
think there is a configurable settings for that), and
probably also custom node factory, to keep track of
information that some part of text came in as CDATA
section instead of generic character data.

-+ Tatu +-



      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ


More information about the XOM-interest mailing list