This content has been marked as final. Show 2 replies
There is a XML forum.
Javadocs seem pretty clear.
String getNodeValue() The value of this node, depending on its type; see the table above.
And from the "Table above"
If Node is Element then node value is null.
XPathExpression xPathExpression = xpath.compile("/root/frame/boxes/box/spec");
Need to xpath all the way down to the text of the node.
XPathExpression xPathExpression = xpath.compile("/root/frame/boxes/box/spec/text()");
You could use
with your current xpath but if the spec node has children, these will also be included in the output.