// createIndex creates a VTD+XML index for an input XML document import com.ximpleware.*; import java.io.*; public class createIndex { public static void main(String[] args) throws Exception{ VTDGen vg = new VTDGen(); if (args.length != 2) throw new Exception("Invalid # of arguments"); String inputName = args[0]; String outputName = args[1]; if (vg.parseFile(inputName,true)){ vg.writeIndex(new FileOutputStream(outputName)); } } }