I've spent lot of time this weekend trying to solve my first
Java xPath issue - though I'm experienced doing xPath in .Net.
I've created this sample and cleaned up XML file (such as no valid IDs and passwords) for
testing:
After my original code kept failing to find the correct results, I created this simple method to try to get the results:
Using the xPathQuery in the sample Java code works if I try it against the same XML in various online xPath test sites and it works if I try it against the same XML in Altova XMLSpy. It just doesn't work in Java. The two commented out lines in the Java code were ust used to validate that the document was loaded properly. getElementsById worked with that query to return a NodeList with all of the datasource elements so I know the Document is loaded ok. I just can't seem to get the xPath to work.
Can anyone find what I'm missing and why this doesn't work for me?
Thanks,
Dale