DOMXPathExpression
classin packageklyn.io.xml.xpath
public class DOMXPathExpression extends Object implements XPathExpression:
└ DOMXPathExpression
All Implemented Interfaces: 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)

Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public DOMXPathExpression Compiles an XPath expression.
Methods
Modifier and Type Member Description
public evaluate
evaluate(contextNode as Node, type as Int, result as XPathResult) as XPathResult throws XPathException, DOMException:
Evaluates this compiled expression against a context node.
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from XPathExpression: evaluate