[jdom-interest] isRootElement issue

Jeremy Howard jeremyh at flashcom.net
Mon Oct 23 23:59:02 PDT 2000


On Mon, 23 Oct 2000, you wrote:
> > > Ideally I feel root.isRootElement should return true sice it
> > > has a child.
> >
> > Just because you have a child doesn't mean you're the root.  A root
> > element is the single element directly held by a document.  This is what
> > isRootElement() tests for.
> >
> > -jh-
> >
> 
> Maybe a better name for the method could be isDocumentRoot () ?
> 
> Guy
> 
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> >
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> t.com
> >
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com


I think isRootElement() is correct just as it is. Since the "Root" element is
always the element held by a Document.   A more reasonable method would be
isParent() for any node that has children.

Jeremy Howard
jeremyh at flashcom.net



More information about the jdom-interest mailing list