[jdom-interest] Updated StAXBuilder

Tatu Saloranta cowtowncoder at yahoo.com
Mon Nov 15 20:50:39 PST 2004

I updated StAX builder classes a bit, to improve
performance: find attached the builder, and a matching
optimized factory class. Latter should also be usable
with SAX parsers to improve their performance a bit
(not tested, but I don't see why it wouldn't work).
There are some other things that could be done to JDom
builders to improve things further, but they'd need
more access (there are "safe" modifiers that builders
that pass known valid content could use).

So, why use StAX parsers instead of SAX? There are no
ground-breaking benefits, but some reasons might be:

* StAX parsers are often more light-weight than SAX
  ones; if you already use StAX parser for performance
  critical parsing, you could just use it without
  adding Xerces
* Fastest StAX parsers (Woodstox, Sun's new StAX
  ["Zephys"]) are slightly faster than fastest SAX
  parser (Xerces)... effect is not huge with JDom,
  though, since major overhead is building the tree,
  not parsing.

In any case, here are the classes in case anyone finds
then useful. They are also available from StaxMisc
page at:


-+ Tatu +-

Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StAXBuilder.java
Type: text/x-java
Size: 12686 bytes
Desc: StAXBuilder.java
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20041115/4b8a807b/StAXBuilder.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FastJDOMFactory.java
Type: text/x-java
Size: 4930 bytes
Desc: FastJDOMFactory.java
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20041115/4b8a807b/FastJDOMFactory.bin

More information about the jdom-interest mailing list