[jdom-interest] StAXOutputter, StAXBuilder for JDom

Tatu Saloranta cowtowncoder at yahoo.com
Thu Oct 20 23:22:58 PDT 2005

I finally got around to finishing up StAX integration
classses; so in addition to the StAXBuilder I sent to
the list a while ago, here's matching StAXOutputter.
Using builder/outputter chain they seem to do
reasonable round-tripping (outputting well-formed
output that if parsed+output again will retain its
exact formatting).

The usual disclaimers apply: using a StAX parser
instead of Sax ones (that JDom defaults to) doesn't
make huge difference when using tree model like
JDom... but there are some cases where it may be
beneficial, especially if some post- or pre-processing
is done in streaming manner.

I tested the code with both Woodstox
(http://woodstox.codehaus.org) and reference
implementation (http://stax.codehaus.org/Home); seemed
to work ok for my sample open office document.

-+ Tatu +-

Start your day with Yahoo! - Make it your home page! 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StAXBuilder.java
Type: text/x-java
Size: 24280 bytes
Desc: 1459373305-StAXBuilder.java
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20051020/ee9267d3/StAXBuilder.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StAXOutputter.java
Type: text/x-java
Size: 14992 bytes
Desc: 3233026613-StAXOutputter.java
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20051020/ee9267d3/StAXOutputter.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StAXTextModifier.java
Type: text/x-java
Size: 7746 bytes
Desc: 1887525195-StAXTextModifier.java
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20051020/ee9267d3/StAXTextModifier.bin

More information about the jdom-interest mailing list