rbv_api.evalXpath()
Purpose
Parses an XML string and evaluates an XPath expression. See http://www.w3schools.com/xsl for more information on XPath.Syntax
rbv_api.evalXpath(xmlString, xpathExpr)
Parameters
xmlString
XML document as a string
xpathExpr
XPath expression to evaluate
Return value
Result of XPath evaluation
Example
The following example evaluates a three-node XPath.
var xmlString =
"<a><b>node one</b><c>node two</c><b>node three</b></a>";
var xpathExpr = "/a/b/text()";
var res = rbv_api.evalXpath(xmlString, xpathExpr);
for (var k=0; k<res.length; k++)
rbv_api.println("Result: "+res.item(k));
Output:
Result: [#text: node one]
Result: [#text: node three]
JAVA_OPTS in the setenv.bat/sh file for specific packages:
For DOM-related issues, include the following line:
JAVA_OPTS=%JAVA_OPTS% --add-exports=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMEDFor DTM reference-related issues, insert the following line:
JAVA_OPTS=%JAVA_OPTS% --add-exports=java.xml/com.sun.org.apache.xml.internal.dtm.ref=ALL-UNNAMED
Any changes made in setenv.bat does require restarting the instance to apply the modifications.
Likewise, in certain scenarios, even after adding the configurations to setenv.bat/sh, you may need to include the class in the CustomClassFilter shared property. This is essential for white labelling purposes, ensuring access via Rhino.