Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] Streaming JDOM

Tatu Saloranta

2006-07-18

Replies:

--- Gregor Zeitlinger <gregor@(protected):

...
> 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
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.