Well, the only way to know would be by walking the tree. If you have a
reference to an Element you can walk by calling getParent() to walk up
and getChildren() to walk down. I'd need convincing this should be
standard in the Element API.
-jh-
bob wrote:
>> How (im)possible would it be for there to be a set of methods
> for checking document order of elements.
>> Something like
>> boolean Element.before(Element that)
> boolean Element.after(Element that)
>> XPath muck sometimes cares about document order of Elements.
> >From the XPath implementation, we have lots of various Elements,
> but not in any particular single tree. We might be holding
> a handful of subtrees from the original document. And need to
> know their relative order.
>> Thoughts?
>> -bob
>> _______________________________________________
> To control your jdom-interest membership:
>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com