diff --git a/src/core/operations/XPathExpression.mjs b/src/core/operations/XPathExpression.mjs index 7e9d768a..0cca73b7 100644 --- a/src/core/operations/XPathExpression.mjs +++ b/src/core/operations/XPathExpression.mjs @@ -57,7 +57,7 @@ class XPathExpression extends Operation { let nodes; try { - nodes = xpath.select(query, doc); + nodes = xpath.parse(query).select({ node: doc, allowAnyNamespaceForNoPrefix: true }); } catch (err) { throw new OperationError(`Invalid XPath. Details:\n${err.message}.`); }