[jdom-interest] streamdom -- middle ground between SAX and DO M
lak at vlakshman.com
Wed Jan 2 07:09:44 PST 2002
On Tuesday 01 January 2002 03:23 pm, bob mcwhirter wrote:
> Sounds like dom4j's ElementHandler registration API to me.
Good point -- there are similarities. Both ElementHandler and
streamdom are attempts to add event handling to DOM processing
but there are two problems with the ElementHandler api
that streamdom resolves:
(1) The ElementHandler API is a side-effect
to the building of the DOM tree, so the entire document is
still being built in memory. With streamdom, you can
ignore elements, so you can ask the parser not to build
the root element.
(2) The ElementHandler API is SAX-like -- you get
onStart and onEnd notifications. streamdom provides
the **entire** element, with attributes and child nodes
to the programmer, so the processing is DOM-like.
More information about the jdom-interest