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