I have an html file where I need to find the number of occurrences of the
Solution 1:
I'm a bit fuzzy on my Java and Xpath, but if you evaluate
expression.evaluate(inputSource, XPathConstants.NODELIST)
You should get back a NodeList of all the Nodes matching your query, and you can just get the length of that list.
Post a Comment for "Xpath Expression To Find All Occerence Of A Element In Html File"