Hi Jeff,
I couldn't test it out, but I think there is something wrong with your xpath.
Node node2 = document.selectSingleNode("//TestA/test[2]");
This will select the second test element: node2 = 2
String data2 = node2.valueOf("test");
This will select the value of the test child-element o
I can get data from a Node that contains multiple elements
but I can’t get data from a node that contains a single element. Am I
missing some basic concept here?
/**
* Sample Test Document (test.xml) located in C:\
*
*
*
* 1
* 2
* 3
*
*
*
*/