diff options
Diffstat (limited to 'src/Main.java')
-rw-r--r-- | src/Main.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Main.java b/src/Main.java index e69de29..99d98c5 100644 --- a/src/Main.java +++ b/src/Main.java @@ -0,0 +1,23 @@ +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +import java.io.File; + +public class Main { + public static void main(String[] argv) { + File xmlReport = new File(argv[0]); + SAXReader saxReader = new SAXReader(); + System.err.println("Attached TolerantXMLErrorHandler: " + TolerantXMLErrorHandler.attach(saxReader)); + Document result; + try { + result = saxReader.read(xmlReport); + } catch (DocumentException ex) { + ex.printStackTrace(); + return; + } + Element root = result.getRootElement(); + System.out.println("ROOT: "+root); + } +} |