Finding XPath location for an Element
Mattias Jiderhamn <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>
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/[email protected]
--
</Mattias>
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]