Skip to content
Snippets Groups Projects
Commit c47429ad authored by Goik Martin's avatar Goik Martin
Browse files

False comment removed

parent 4df3b8b5
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,43 @@ public abstract class ConversionTest {
protected ConversionTest(final String xmlInputFileName, final String extension) {
this.xmlInputFileName = xmlInputFileName;
this.htmlOutputFileName = xmlInputFileName + extension;
PrintStream out;
try {
System.err.println("of=" + htmlOutputFileName);
out = new PrintStream(htmlOutputFileName);
} catch (FileNotFoundException e1) {
errorInitString = "Unable to open file '" + htmlOutputFileName + "' for writing";
return;
}
Memo2Html memo2html;
try {
memo2html = new Memo2Html(out);
} catch (SAXException | ParserConfigurationException e2) {
e2.printStackTrace();
return;
}
try {
memo2html.parse(xmlInputFileName);
} catch (IOException e1) {
errorInitString = "Unable parse file '" + xmlInputFileName + "'";
return;
} catch (SAXException e) {
e.printStackTrace();
}
final SAXBuilder parser = new SAXBuilder();
try {
htmlRootElement = parser.build(htmlOutputFileName).getRootElement();
} catch (JDOMException | IOException e1) {
errorInitString = "Unable to parse file '" + htmlOutputFileName + "', see stack trace for further information";
e1.printStackTrace();
}
out.close();
}
public final String xmlInputFileName, htmlOutputFileName; // To be statically initialized in derived class
public final String xmlInputFileName, htmlOutputFileName;
protected String errorInitString = null;
protected Element htmlRootElement;
......@@ -54,7 +88,6 @@ public abstract class ConversionTest {
try {
memo2html = new Memo2Html(out);
} catch (SAXException | ParserConfigurationException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
return;
}
......@@ -64,7 +97,6 @@ public abstract class ConversionTest {
errorInitString = "Unable parse file '" + xmlInputFileName + "'";
return;
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
final SAXBuilder parser = new SAXBuilder();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment