[jdom-interest] JDOM w/ *long* streams

Daniel Rall dlr at finemaltcoding.com
Thu Aug 10 14:56:42 PDT 2000

Jason Hunter wrote:
> > I thought that
> > JDOM would provide a higher level interface--already defined--for
> > accessing the record data.
> JDOM is higher level and easier to use than SAX, but if you need purely
> sequential read-only access to large XML data sources, then that's
> exactly what SAX was invented for.  JDOM fits the bill when you need
> non-sequential access, need the ability to change the doc and/or write
> the doc, or want an easier API for accessing the data.

I currently only need sequential access, but I do have to manipulate the
document data.  I was thinking of doing a XSL transform to massage the
XML into a SQL statement, but I need to manipulate the data encapsulated
by the XML stream.  Since SAX is the way to go for sequential access,
instead of editting the XML node data using JDOM and piping to XSLT,
I'll just use SAX and do the editting and transformations manually.  If
this sounds unreasonable to anyone, please kick me now.  :)

> So SAX or JDOM for you?  If JDOM, then you'll need a builder that pulls
> data from SAX and makes that data available as needed by JDOM.  You'll
> need a special Element subclass and probably a special List
> implementation whose get methods are written to pull more data from SAX
> if they don't already have the data they need.

Thanks for the good explanation of the JDOM implementation Jason.  I
noted this in the spec. (for the inevitable time when the requirements

Daniel Rall

More information about the jdom-interest mailing list