[jdom-interest] Re: BUG: XMLOutputter inserts extra empty lines
Joseph Bowbeer
jozart at csi.com
Fri Dec 7 00:38:34 PST 2001
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)
http://cvs.jdom.org/cgi-bin/viewcvs.cgi/jdom/src/java/
samples.sax.XMLWriter plus some filter implementations
http://cvs.jdom.org/cgi-bin/viewcvs.cgi/jdom/samples/sax/
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
gnu.xml.util.XMLWriter
http://www.gnu.org/software/classpathx/jaxp/
http://www.gnu.org/software/classpathx/jaxp/apidoc/index.html
http://savannah.gnu.org/cgi-bin/viewcvs/classpathx/jaxp/source/
James Strachan's org.dom4j.io.XMLWriter is also worthy of mention:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/src/java/
---
Joe Bowbeer
More information about the jdom-interest
mailing list