Convert the file
try {
if (verbose)
System.err.println(">>>Parsing " + fileName + "...");
// Make the document a URL so relative DTD works.
//String uri = "file:" + new File(fileName).getAbsolutePath();
InputStream uri = getClass().getResourceAsStream(fileName);
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse( uri );
if (verbose)
System.err.println(">>>Walking " + fileName + "...");
XmlFormWalker c = new GenMIF(doc, msg);
c.convertAll();
} catch (Exception ex) {
System.err.println("+================================+");
System.err.println("| *Parse Error* |");
System.err.println("+================================+");
System.err.println(ex.getClass());
System.err.println(ex.getMessage());
System.err.println("+================================+");
}
if (verbose)
System.err.println(">>>Done " + fileName + "...");