Hi Guys,
I have a problem using xpath from within
java. I have an example XML file that looks somethink like this:
And some very simple java code to parse it (I've removed all te try/catch blocks and function calls to just show the relevant parts):
where dbFile is the path to the XML file iven earlier.
When searchTerm= "/catalog", a get a
string representation of all the nodes in the xml document as expected.
If search term is either:
/catalog//cd
or
//cd
I only get the first cd node returned. I would have expected to have all cd nodes returned. What am I doning wrong here ??
Note: /catalog/cd[1] and /catalog/cd[2] work as expected.
Any ideas ?
Clive