Skip to Content.
Sympa Menu

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

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Tatu Saloranta <cowtowncoder AT yahoo.com>
  • To: XOM interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] How to preserving CDATA Section when use Serializer ?
  • Date: Sat, 17 Nov 2007 08:59:07 -0800 (PST)

--- 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




Archive powered by MHonArc 2.6.24.

Top of Page