Replies: 2 comments 2 replies
-
Rhino is an EcmaScript/JavaScript engine, which means it doesn't support all the additions that browsers ship with, which is what I think you're looking for |
Beta Was this translation helpful? Give feedback.
2 replies
-
Rhino has e4x as a built-in xml processor. You can get xpath support through java. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to have access to XPathEvaluator or document.evaluate into a java rhino embedded js script ?
I've tried:
String multiCode="var test=function(text, xPathRegex, xpathResult){" + "\r\n" + "const parser = new DOMParser();" + "\r\n" + "const document = parser.parseFromString(text);" + "\r\n" + "var results=document.evaluate(xPathRegex, text, null, xpathResult, null);" + "\r\n" + "return results}"; engine.eval(multiCode);
But the js engine does not have access to DOMParser. I tried XPathEvaluator too.
Beta Was this translation helpful? Give feedback.
All reactions