evaluate

fun evaluate(contextNode: Node, type: Short = definedExternally, result: XPathResult? = definedExternally): XPathResult(source)

The evaluate() method of the returns an XPathResult.

MDN Reference