public < T > T evaluateXPath ( String xpathExpression , Node context , Class < T > as ) throws XPathExpressionException { checkContext ( context ) ; return castAs ( getXPathProcessor ( ) . evaluate ( xpathExpression , context , returnXPathConstant ( as ) ) , as ) ; }
Evaluate a string XPath expression relative to a node such as a node returned by a previous XPath expression . An XPath expression can return a Node or subinterface such as Element or Text a NodeList or a Boolean Number or String value .