[jdom-interest] isRootElement issue

Jason Hunter jhunter at collab.net
Mon Oct 23 13:19:52 PDT 2000

isRootElement returns true only if "document != null".  In other words,
only if it directly holds a reference to its document which only the
root will do.  What's wrong with that?  If you have an actual test case
that fails, please send it, making sure of course to test against the
latest first.  :-)


Kesav Kumar wrote:
> The method isRootElement() returns true/false on the basis of document.  Is
> it right way of doing?  I think we need to decide whether the element is
> root based on whether the element has any parent.  The reason is If i create
> a new Element the document is null, after I added child to the new Element
> and query on the child isRootElement it gives true since there is no
> document.  I feel we should check whether getParent() is null or not.
> Any suggestions--
> Kesav Kumar
> Software Engineer
> Voquette, Inc.
> 650 356 3740
> mailto:kesavk at voquette.com
> http://www.voquette.com
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list