I have a class with members -
private Document myDoc; XPath xpath = XPathFactory.newInstance().newXPath();
I am trying to use the evaluate function -
Object result = xpath.evaluate(expression, this.myDoc, XPathConstants.NODESET);
when expression is string st
expression = "inventory/book[" + "count(following-sibling::book/price/text()=14.95)=0 ]" ;
and I get the following exception -
java.lang.RuntimeException: Can not convert
even when I change XPathConstants.NODESET to XPathConstants.NUMBER , I get the same exception. thanks in advance.
source share