Skip to main content

Trying to evaluate XPath off given Element

1 reply [Last post]
misha680
Offline
Joined: 2008-10-03
Points: 0

Dear All:

I am somewhat (very) confused.

I compile an XPathExpression using XPath.compile - my expression, in this case, is "//a"

I then apply this expression to an element as:
evaluate(element,XPathConstants.Node)

However, what I end up getting is the first a node in the _document_, not the one that is a child of element. Am I missing something simple?

Thank you!
Misha

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
misha680
Offline
Joined: 2008-10-03
Points: 0