AwaitedDOM/ XPathEvaluatorBase

TheĀ XPathEvaluator interface allows to compile and evaluate XPath expressions.
It is implemented by the Document interface.

Methods

.createExpression(expression, resolver?)
W3C

Creates a parsed XPath expression with resolved namespaces.

Arguments:

  • expression string. A string representing representing the XPath expression to be created.
  • resolver XPathNSResolver. Permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs.

Returns: XPathExpression

.evaluate(expression, contextNode, resolver?, type?, result?)
W3C

Evaluates an XPath expression string and returns a result of the specified type if possible.

Arguments:

  • expression string. A string representing the XPath expression to be parsed and evaluated.
  • contextNode Node. A Node representing the context to use for evaluating the expression.
  • resolver XPathNSResolver. Permits translation of all prefixes, including the xml namespace prefix, within the XPath expression into appropriate namespace URIs.
  • type number. Specifies the type of result to be returned by evaluating the expression. This must be one of the XPathResult.Constants.
  • result XPathResult. Allows to specify a result object which may be reused and returned by this method. If this is specified as null or the implementation does not reuse the specified result, a new result object will be returned.

Returns: XPathResult

Unimplemented Specs

Methods

createNSResolver()

Edit this page on GitHub