org.w3c.dom.xpath.XPathEvaluator.createExpression
method

    public createExpression(expression as String, resolver as XPathNSResolver) as XPathExpression throws XPathException, DOMException

Description

Creates a reusable compiled XPath expression.

Parameters

Parameter | Description
--- | ---
`expression` | XPath expression text.
`resolver` | Namespace resolver, or `null` when no prefixes are used.

Returns

Compiled expression.

Throws

- XPathException if the expression is invalid.
- DOMException if namespace resolution fails.

Example

    compiled = evaluator.createExpression("//item", null)