import org.planx.xmlstore.*; import org.planx.xmlstore.stores.*; import org.planx.xmlstore.input.*; import java.io.*; public class XMLStoreExample { public static void main(String[] args) throws XMLException, UnknownReferenceException, IOException { if (args.length < 1) { System.out.println("Usage: XMLStoreExample "); return; } // Create XML Store XMLStore xmlstore = new LocalXMLStore("mystore"); // Use SAX parser to construct a representation of the file Node node = SAXBuilder.build(args[0]); // ...and save it in XML Store Reference ref = xmlstore.save(node); // Load the first child Node c = xmlstore.load(ref).getChildren().get(0); // ...and print its tag System.out.println(c.getNodeValue()); xmlstore.close(); } }