diff options
author | Sven Gothel <[email protected]> | 2011-02-25 00:17:50 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-02-25 00:17:50 +0100 |
commit | 52c005fb1ce1339cf6dca30f4a30f6edc430d597 (patch) | |
tree | 29f1ad8e6547029098cafa5b81f52edc28e3b70d /src/Main.java | |
parent | f7f6cdea6749a709ebdb34165ad047e9556492f1 (diff) |
Rewritten due to some corruption (fs ?)
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); + } +} |