Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] Subclassing Serializer

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Fitzgerald" <mike AT wyeast.net>
  • To: "xom-interest" <xom-interest AT lists.ibiblio.org>
  • Subject: RE: [XOM-interest] Subclassing Serializer
  • Date: Tue, 8 Oct 2002 14:15:23 -0700

John Cowan wrote:
> > protected void writeMarkup(String s)
> > protected void writePCDATA(String s)
>
> I like this idea, and would add:
>
> writeStartTag, writeEndTag, writeEmptyTag, writePITarget, writePIContent,
> writeProlog, writeEpilog.

I like these fine-grained methods, too, even though they may spawn
well-formedness errors, but one can detect them easily enough anyway.

One use case: serializing plain text as XML.

Also, for aesthetics, I wish I could get an element with no text children to
be formed as an empty element tag instead of a start tag and end tag with no
content. In other words, this

<empty/>

is preferred over this

<empty></empty>

although they are syntactically the same.

Mike





Archive powered by MHonArc 2.6.24.

Top of Page