[jdom-interest] Re: BUG: XMLOutputter inserts extra empty lines

Joseph Bowbeer jozart at csi.com
Fri Dec 7 01:50:42 PST 2001

PS - Also have a look at gnu.xml.pipeline.TextConsumer, which is the
"pipelined" version of XMLWriter.


By the way, the gnu.xml.pipeline design looks very interesting.  Are there
any ideas here we should apply to XMLOutputter?

----- Original Message -----
From: "Joseph Bowbeer" <jozart at csi.com>
To: "Hallvard Tratteberg" <hal at idi.ntnu.no>
Cc: <jdom-interest at jdom.org>; <James.Todd at Sun.COM>
Sent: Friday, December 07, 2001 12:38 AM
Subject: Re: BUG: XMLOutputter inserts extra empty lines

Hallvard Tratteberg writes to James Todd:

> I've been toying with the same idea, a kind of output-analog
> to the Builder, SAXBuilder and SAXParser structure that is
> used when reading, parsing and building a document.
> The idea is to use the SAXReader (or SAXFilter) interface
> to also perform output, and I believe there are SAXReaders
> that do this already, i.e. receive SAX events and write out
> a new XML document ...

JDOM already has some of this:

 org.jdom.output.SAXOutputter (shredder + writer)

 samples.sax.XMLWriter plus some filter implementations

By the way, samples.sax.XMLWriter was derived from Megginson's XMLWriter
(ver 0.2).  Our version includes a couple of bug fixes and a different class
hierarchy than Megginson's original version.

The most complete XMLWriter I know of is Dave Brownell's


James Strachan's org.dom4j.io.XMLWriter is also worthy of mention:


Joe Bowbeer

More information about the jdom-interest mailing list