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 ByXPath.compile( ) |