25.73. Document.evaluate( ): evaluate an XPath expressionFirefox 1.0, Safari 2.01, Opera 9:25.73.1. SynopsisXPathResult evaluate(String xpathText, Node contextNode, Function namespaceURLMapper, short resultType, XPathResult result) tHRows DOMException, XPathException 25.73.1.1. Arguments
25.73.1.2. ReturnsA XPathResult object representing the evaluation of the expression against the given context node. 25.73.1.3. ThrowsThis method may throw an exception if the xpathText contains a syntax error, if the result of the expression cannot be converted to the desired resultType, if the expression contains namespaces that namespaceURLMapper cannot resolve, or if contextNode is of the wrong type or is not associated with this document. 25.73.2. DescriptionThis method evaluates the specified XPath expression against the given context node and returns an XPathResult object, using type to determine what the result type should be. If you want to evaluate an expression more than once, use Document.createExpression( ) to compile the expression to an XPathExpression object and then use the evaluate( ) method of XPathExpression. Internet Explorer does not support this API. See Node.selectNodes( ) and Node.selectSingleNode( ) for an IE-specific alternative. 25.73.3. See Also
|