[jdom-interest] (no subject)
Bradley S. Huffman
hip at csa.cs.okstate.edu
Thu May 29 09:20:51 PDT 2003
Jason Hunter writes:
> Hmm, I'm still thinking we need a method like getParentElement().
> Returns the parent Element or null if root or unattached. It could be
> added to Child. Then you could call
> getParentElement().getParentElement()...
Only if your absolutely sure there will always be a non-null object returned
for each call. "If it cann't be broken, users will find a way to break it".
> Then all b9 getParent() calls can be moved to getParentElement() calls
> in b10. I think getParent() has to continue returning a Parent just to
> be sensible.
>
> Thoughts?
Then you'd have 3 different methods for moving up the tree getDocument,
getParent, and getParentElement. May as well throw in getRootElement
and getParent(int level) ;-)
Brad
More information about the jdom-interest
mailing list