[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();


----- 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:
<d> </d>

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?

To control your jdom-interest membership:



More information about the jdom-interest mailing list