[jdom-interest] Finding XPath location for an Element

Mattias Jiderhamn mj-lists at expertsystems.se
Tue Jan 10 11:01:37 PST 2012


while(node != null) {
   ... // Build XPath or list bottom up
   node = node.getParent();
}

</Mattias>

----- Original Message -----
Subject: [jdom-interest] Finding XPath location for an Element
Date: Tue, 10 Jan 2012 13:46:07 -0500
From: cliff palmer <palmercliff at gmail.com>

I'd like to be able to find the XPath search or the node hierarchy for
an Element. For example, if the Element is <d> in:
<a>
<b>
<c>
<d> </d>
</c>
</b>
</a>

I'd like to have either the XPath search argument ("/a//b//c//d) or
the list of nodes in the elements parents ("a b c d").

Is there a method that returns this?

Cliff
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com


-- 

   </Mattias>	



More information about the jdom-interest mailing list