Code example for Document

Methods: getDocumentElement

    public LayoutAnalysis analyze(String name, Document document) {
        LayoutAnalysis analysis = new LayoutAnalysis(name);
        try { 
            Element root = document.getDocumentElement();
            analyze(analysis, root);
        } finally { 
        return analysis;        
    private void analyze(LayoutAnalysis analysis, Node node) {
        NodeList list = node.getChildNodes();
        int count = list.getLength();
        applyRules(analysis, node);
Connect your IDE to all the code out there  Get Codota for Java