summaryrefslogtreecommitdiffstats
path: root/src/Main.java
blob: 99d98c57482835cd805d4184e90da0253734fac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
    }
}