I am trying to create an XPath expression in Java (8, default XPath implementation). I am doing the following:
Object res = xpath.evaluate("(//*[local-name()='PartyId'])", requestDom, XPathConstants.NODESET);
I have multiple PartyId nodes in the document at the same level, because it's parent is repeating. I got my result, but only a single node. (the first).
Side info: if I write [$k] at the end of the expression, like [1], or [2], I got my elements, but I need all of them. :(
However, if I am testing the very same XPath for example at http://www.freeformatter.com/xpath-tester.html I get multiple results which is the expected result. Any ideas?
p.s. I tried to put Saxon on the classpath but it completely breaks my application (Spring-Boot WS).
Thanks a lot!
UPDATE I failed to correctly check the result and it was absolutely correct.