klyn.io.xml.xpath.DOMXPathEvaluator.evaluate
method
public evaluate(expression as String, contextNode as Node, resolver as XPathNSResolver, type as Int, result as XPathResult) as XPathResult throws XPathException, DOMException:
Description

Evaluates an XPath expression.

Parameters
ParameterDescription
expressionXPath expression text.
contextNodeContext node.
resolverNamespace resolver, or null.
typeRequested XPathResult type.
resultReusable result object, or null.
Returns

XPath result.

Throws
  • XPathException if evaluation fails.
  • DOMException if the context node is invalid.
Example
result = evaluator.evaluate("string(//title)", document, null, XPathResult.STRING_TYPE, null)