Is there a way using xpath to obtain the entire tree structure. For example, say this is the xml
<a>
<b>
<c>
data
</c>
</b>
</a>
I would like the xpath to pick up all the contents of the node and the result should be
<b>
<c>
data
</c>
</b>
I have been using VTD-XML and java so far to retrieve the elements so far. This is the code I have been using.
VTDGen vg = new VTDGen();
vg.setDoc(xmlString);
vg.parse(true);
VTDNav vn = vg.getNav();
AutoPilot ap = new AutoPilot(vn);
ap.selectXPath(xPath);
String data = ap.evalXPathToString();