[jdom-interest] XPath?
bob mcwhirter
bob at werken.com
Wed Sep 19 12:14:18 PDT 2001
On Wed, 19 Sep 2001, Frank Sauer wrote:
> I'm trying to use an XPath engine with JDOM to obtain the textual
> content of the <name> element under the <tag> element in a taglib tld
> file. I tried to use both werken.xpath and jaxen, but can't
> get either to work. The context node is the <tag> element, so I tried
> all of the following expressions:
>
> name
This should select the <name> org.jdom.Element
> name/text()
This *should* select the string-value of the org.jdom.Element,
which recursively constructs the string based upon sub-elements
too.
> child::name
This is the same as 'name' above.
> child::name/text()
This is the same as 'name/text()' above.
> /name
This will only select the root element if its
a <name> tag, else an empty-set will be returned.
> //name
This will select all <name> elements within your
document.
My question now:
*Which* XPath engine are you using?
-bob
More information about the jdom-interest
mailing list