![JAR search and dependency download from the Maven repository](/logo.png)
examples.duplicateNav.duplicateNav Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vtd-xml Show documentation
Show all versions of vtd-xml Show documentation
XimpleWare's VTD-XML is, far and away, the industry's most advanced and powerful XML processing model for SOA and Cloud Computing
/**
* This example shows how to create multiple VTDNav objects from
* the same XML, LC and VTD buffer. Parallel XPath evaluation is
* enabled by duplicateNav().
*
*/
import src.ximpleware.*;
public class duplicateNav {
public static void main(String[] args) throws Exception{
VTDGen vg = new VTDGen();
if (vg.parseFile("mix3.xml",true)){
VTDNav vn = vg.getNav();
// duplicated VTDNav instances share the same XML, LC buffers and VTD buffers.
VTDNav vn2 = vn.duplicateNav();
VTDNav vn3 = vn2.duplicateNav();
AutoPilot ap = new AutoPilot(vn3);
ap.selectXPath("//*");
int i;
while((i=ap.evalXPath())!=-1){
System.out.println(vn3.toString(i));
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy