Name
XPathExpression
Synopsis
If an XPath expression is to be evaluated more
than once, it is not efficient to call the XPath.evaluate(
)
method repeatedly. Instead, compile the expression to an
XPathExpression
using the XPath.compile(
)
method and then evaluate it using one of the
evaluate( )
methods of
XPathExpression
. The evaluate(
)
methods of XPathExpression
behave just
like the corresponding methods of XPath
. See
XPath
for details.
public interface XPathExpression { // Public Instance Methods String evaluate(org.xml.sax.InputSource source) throws XPathExpressionException; String evaluate(Object item) throws XPathExpressionException; Object evaluate(Object item, javax.xml.namespace.QName returnType) throws XPathExpressionException; Object evaluate(org.xml.sax.InputSource source, javax.xml.namespace. QName returnType) throws XPathExpressionException; }
Returned By
XPath.compile( )
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.