From: "Dane Foster" <[EMAIL PROTECTED]>
> How lazy is dom4j's lazy document construction? I'm trying to find out at
> what point during a DOM construction the tree builder actually creates
> nodes.
Its not that lazy right now. After a document is parsed using SAXReader,
there will be an Element instance created for all elements in the XML. Where
the laziness comes in is the inside the implementation of DefaultElement. It
uses lazy construction to avoid always creating List objects for attributes
and child contents if an element only contains one attribute or content
node.
A really lazy implementation could be done using the XML Pull Parser whereby
Elements are created as the tree is navigated. A similar approach could be
taken for persistent dom4j models where an Element's children are loaded as
the tree is traversed. Maybe an XLink Element implementation could behave in
a similar way too.
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dom4j-user