/* * (C) Copyright 1999 Norman Walsh */ import java.io.File; import java.net.URL; import java.net.MalformedURLException; import org.xml.sax.Parser; import org.xml.sax.SAXException; import org.xml.sax.helpers.ParserFactory; import com.ibm.xml.parsers.DOMParser; import org.w3c.dom.*; import cfgFile; public class testapp { static Document doc = null; public static void main(String args[]) throws Exception { String parserClass = "com.ibm.xml.parsers.DOMParser"; String xmlFile = null; // Read the command line try { for (int i=0; i ( | )"); System.out.println("Options:"); System.out.println(" -p (default is com.ibm.xml.parsers.SAXParser)"); System.out.println(" -h (default is SAXCount.SAXCountHandlers)"); System.out.println(" -d (default is com.ibm.domimpl.DocumentImpl)"); System.out.println(" -w (warmup the parser before timing)"); } // // Create a URL object from either a URL string or a plain file name. // static URL createURL(String name) throws Exception { try { URL u = new URL(name); return u; } catch (MalformedURLException ex) { } URL u = new URL("file:" + new File(name).getAbsolutePath()); return u; }; }