public class DOMXPathExpression extends Object implements XPathExpression:
Compiled pure Klyn XPath expression.
The implementation currently targets the DOM XPath 1.0 API and deliberately rejects unsupported syntax with XPathException.INVALID_EXPRESSION_ERR.
@example `klyn import klyn.io.xml.xpath import org.w3c.dom.xpath
expression = DOMXPathExpression("//Spy[@id='007']/Email/text()", null) result = expression.evaluate(document, XPathResult.STRING_TYPE, null) print(result.stringValue)
| Modifier and Type | Member | Description |
|---|---|---|
| public | DOMXPathExpressionDOMXPathExpression(expression as String, resolver as XPathNSResolver) throws XPathException, DOMException: |
Compiles an XPath expression. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | evaluateevaluate(contextNode as Node, type as Int, result as XPathResult) as XPathResult throws XPathException, DOMException: |
Evaluates this compiled expression against a context node. |