[jdom-interest] Streaming JDOM

Tatu Saloranta cowtowncoder at yahoo.com
Tue Jul 18 11:11:03 PDT 2006


--- Gregor Zeitlinger <gregor at zeitlinger.de> wrote:

...
> I have seen that StAX is a better SAX, because it is
> pull rather than
> push based.
> It is still somewhat awkward, because you have Event
> objects and you
> have to keep track of endElement events.
> 
> It occured to me, that this doesn't need to be the
> case. It is
> possible to have a Streaming XML API (i.e. where not
> the whole tree is
> in memory), which is (almost) as easy to use as
> JDOM:

This is a reasonable direction to take. I wrote
StaxMate (http://woodstox.codehaus.org/StaxMate),
which does use similar api. But now I should actually
write some documentation, and finalize version 1.0.
;-)

At any rate, I have noticed that for my own projects I
seldom use "raw" Stax cursor (and never event) api --
StaxMate wrappers add neglibible overhead, and make
things convenient enough to make me productive.
For input (parsing) side skipping of sub-trees and
matching end elements is the first most obvious
benefit, and for output, similarly being able to pass
"context", and passing first-class namespace objects
is nice.

-+ Tatu +-


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the jdom-interest mailing list