When I run the following
XPathFactory xpathFactory = XPathFactory.instance();
XPathExpression<Double> query =
xpathFactory.compile("count(1)", Filters.fdouble());
List<Double> result = query.evaluate(new Element("test"));
yet the evaluation fails:
Unable to evaluate expression. See cause Cause: Function :count
That is a bit nonsense example, but I wanted something self contained. What is wrong with this?
If you want to count the number of
test
elements, try this;