XmlDocument doc = XmlDocument.createXmlDocument(uri);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse( uri );
	protected void convert(String fileName, boolean verbose) {		Reader is;		try {			if (verbose)				System.err.println(">>>Parsing " + fileName + "...");			// Make the document a URL so relative DTD works.			String uri = "file:" + new File(fileName).getAbsolutePath();			XmlDocument doc = XmlDocument.createXmlDocument(uri);			if (verbose)				System.err.println(">>>Walking " + fileName + "...");			doRecursive(doc);		} catch (Exception ex) {			System.err.println("+============================+");			System.err.println("|        XTW Error           |");			System.err.println("+============================+");			System.err.println(ex.getClass());			System.err.println(ex.getMessage());			System.err.println("+============================+");		}		if (verbose) {			System.err.println(">>>Done " + fileName + "...");		}	}