createExpression

open fun createExpression(expression: String, resolver: XPathNSResolver? = definedExternally): XPathExpression(source)

MDN Reference