[jdom-interest] Element.getDocument() ?

Jason Hunter jhunter at collab.net
Thu Aug 31 02:31:28 PDT 2000


bob wrote:
> 
> Probably just recursively getParent() until isRootElement(),
> and hold a reference to the Document there.  Maybe.

Sounds about right.  You could save space and some logic work by getting
rid of the isRootElement boolean and just handling a parentDocument
Element reference.  For example, you implement isRootElement() as:

return (parentDocument != null);

-jh-



More information about the jdom-interest mailing list