klyn.io.xml.xpath.DOMXPathEvaluator.createExpression
method

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

Description

Compiles an XPath expression.

Parameters

- expression XPath expression text.
- resolver Namespace resolver, or `null`.

Returns

Compiled expression.

Throws

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

Example

    expression = evaluator.createExpression("//item[@id='42']", null)