My XML
<catalog>
<item Id="1">
<book id="b1">
</book>
<cd id="c1">
</cd>
</item>
<item Id="11">
<book id="b11">
</book>
<cd id="c11">
</cd>
</item>
</catalog>
what I have ..
ap.selectXPath("/catalog/item");
while ((result = ap.evalXPath()) != -1) {
if (vn.toElement(VTDNav.FIRST_CHILD, "item")) {
do {
//do something with the contnets in the item node
} while (vn.toElement(VTDNav.NEXT_SIBLING, "book"));
}
// move to the parent node to traverse the rest of the items }
What I want is to get to the "cd" node.
In some of the examples I saw VTDNav.NEXT_CHILD but seems like is not available . Can anyone suggest how to get to the node I need to . For now I am managing to do it by getting to the FIRST_CHILD and then moving to the next sibling
if (vn.toElement(VTDNav.FIRST_CHILD, "book")) {
// Move to the next sibling
vn.toElement(VTDNav.NEXT_SIBLING, "cd");
}
Appreciate all your help
Regards