I have an xml file like this one
<root>
<test>
<bla>test1</bla>
</test>
<test>
<bla>test2</bla>
</test>
<test>
</test>
</root>
Now I want to parse it using vtd-xml-parser using XPath expressions. I am looking for tags firsttest
VTDNav vn = vg.getNav();
AutoPilot ap = new AutoPilot(vn);
ap.selectXPath("//test");
Now I want to search in this tag testfor tagsbla
int result = -1;
int count = 0;
while ((result = ap.evalXPath()) != -1) {
}
Can someone tell me how to make this expression? I do not want to search the entire document for tags bla, because I want to be able to tag blatags test. I cannot do this if the tags are blaempty, and I am viewing the entire document for the tag bla.
source
share