org.w3c.dom.xpath.XPathExpression.evaluate
method

    public evaluate(contextNode as Node, type as Int, result as XPathResult) as XPathResult throws XPathException, DOMException

Description

Evaluates this expression against a context node.

Parameters

Parameter | Description
--- | ---
`contextNode` | Context node.
`type` | Requested `XPathResult` type.
`result` | Reusable result object, or `null`.

Returns

XPath result.

Throws

- XPathException if result conversion fails.
- DOMException if the context node is invalid.

Example

    result = expression.evaluate(document, XPathResult.ANY_TYPE, null)