我有与会员的等级 -
private Document myDoc;
XPath xpath = XPathFactory.newInstance().newXPath();
i 尝试使用 评价
函数 -
Object result = xpath.evaluate(expression, this.myDoc,
XPathConstants.NODESET);
当 表达式
是 string
s.t
expression = "inventory/book[" +
"count(following-sibling::book/price/text()=14.95)=0 ]" ;
我得到了接下来的例外...
java.lang.RuntimeException: Can not convert #BOOLEAN to a NodeList!
即使我把 XPathconstants.NODESET
更改为 XPathconstants.NUMBER
i, 也会得到相同的例外。 感谢提前。