incremental update capability, such as delete, insert and update. The extended VTD-XML consists of the following classes: VTDGenHuge (Extended VTD Generator) encapsulates the main parsing. XMLBuffer performs in-memory loading of XML documents. XMLMemMappedBuffer performs memory mapped loading of XML documents. VTDNavHuge (Extended VTD Navigator) (1) encapsulates XML, Extended VTD, and hierarchical info, (2) contains various navigation methods, (3) performs various comparisons between VTD records and strings, and (4) converts VTD records to primitive data types. AutoPilotHuge performs node-level iteration and XPath. Code sample /* In this java program, we demonstrate how to use XMLModifier to incrementally * update a simple XML purchase order. * a particular name space. We also are going * to use VTDGen's parseFile to simplify programming. */ import com.ximpleware.*; public class Update { public static void main(String argv[]) throws NavException, ModifyException, IOException{ // open a file and read the content into a byte array VTDGen vg = new VTDGen(); if (vg.parseFile("oldpo.xml", true)){ VTDNav vn = vg.getNav(); AutoPilot ap = new AutoPilot(vn); XMLModifier xm = new XMLModifier(vn); ap.selectXPath("/purchaseOrder/items/item[@partNum='872-AA']"); int i = -1; while ((i = ap.evalXPath()) != -1){ xm.remove(); xm.insertBeforeElement("<something/>\n"); } ap.selectXPath("/purchaseOrder/items/item/USPrice[.<40]/text()"); while ((i = ap.evalXPath()) != -1){ xm.updateToken(i, "200"); } xm.output("newpo.xml"); } } } References XML XML parsers Cross-platform free software Java platform .NET programming tools XML-based standards C (programming language) libraries C++ libraries