XPathExecutor¶
-
public class
XPathExecutor
¶ XPathExecutor is an executor which evaluates a given xpath and yields the result.
Example:
XPathExecutor exec = new XPathExecutor(getDocument("doc.xml")); exec.registerFunction("http://example.com", "sum", new MySum()); System.out.println(exec.eval( "3 + number('3') + eg:sum(3, 4, '5.1') + /values/one - 2")); // The result will be '17.1'
Author: Hugo Y. K. Lam