OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DOM vs JDOM



SNedunuri@pav.com wrote:
> In their article Easy Java/XML integration with JDOM, Part 1 in JavaWorld,
> http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.htm
> Hunter and McLaughlin say: "DOM represents a document tree fully held in
> memory."

This is a statement to promote their project and generate FUD for the
DOM.  While I like JDOM and have my complaints about the DOM, there's
not much difference between JDOM and most DOM implementations other than
the fact that JDOM isn't interface and factory-based.

> Is there anything inherent in the DOM interface that requires the document
> to be held in memory? Why does the DOM interface require that a document be
> fully held any more than the JDOM interface does?

There is nothing that requires a DOM tree to be held in memory other
than the DOM implementation itself.  Lazy DOMs allow you to
incrementally retrieve and traverse DOM trees, I believe the Xerces
project was working on such a beast, and the dbXML DOM is partially a
lazy DOM.

-- Tom