xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: John Cowan <jcowan AT reutershealth.com>
- To: Arjan Huijzer <huijzer AT gmail.com>
- Cc: XOM-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] CDATA sections
- Date: Tue, 4 Jan 2005 09:58:09 -0500
Arjan Huijzer scripsit:
> I was wondering what the best way was to generate the CDATA section with
> XOM.
The obvious approach is to subclass Serializer and override the
write(Text t) method, somewhat as follows:
write(Text t) {
if (cdata_wanted()) {
writeRaw("<![CDATA[");
writeRaw(t);
writeRaw("]]>");
}
else
super.write(t);
}
You will probably need to override writeStartTag as well in order
to be able to figure out which element you are in and whether you
want to generate a CDATA section for it.
--
I suggest you call for help, John Cowan
or learn the difficult art of mud-breathing. jcowan AT reutershealth.com
--Great-Souled Sam http://www.ccil.org/~cowan
-
[XOM-interest] CDATA sections,
Arjan Huijzer, 01/04/2005
- Re: [XOM-interest] CDATA sections, John Cowan, 01/04/2005
- Re: [XOM-interest] CDATA sections, Elliotte Harold, 01/04/2005
- <Possible follow-up(s)>
-
RE: [XOM-interest] CDATA sections,
New, Cecil (GE Trans), 01/04/2005
-
Re: [XOM-interest] CDATA sections,
Elliotte Harold, 01/04/2005
-
Re: [XOM-interest] CDATA sections,
John Cowan, 01/04/2005
- Re: [XOM-interest] CDATA sections, Arjan Huijzer, 01/05/2005
-
Re: [XOM-interest] CDATA sections,
Arjan Huijzer, 01/05/2005
- Re: [XOM-interest] CDATA sections, Elliotte Harold, 01/05/2005
-
Message not available
-
Re: [XOM-interest] CDATA sections,
John Cowan, 01/05/2005
-
Re: [XOM-interest] CDATA sections,
Arjan Huijzer, 01/05/2005
- Re: [XOM-interest] CDATA sections, John Cowan, 01/05/2005
-
Re: [XOM-interest] CDATA sections,
Arjan Huijzer, 01/05/2005
-
Re: [XOM-interest] CDATA sections,
John Cowan, 01/05/2005
-
Re: [XOM-interest] CDATA sections,
John Cowan, 01/04/2005
-
Re: [XOM-interest] CDATA sections,
Elliotte Harold, 01/04/2005
Archive powered by MHonArc 2.6.24.