Code example for ContentHandler

Methods: startDocument

0
        addEnd(name);
    } 
 
    protected void addDocumentStart() { 
        try { 
            h.startDocument();
        } catch (SAXException ex) {
            throw new RuntimeException(ex.getException());
        } 
    } 
 
    protected void addDocumentEnd() { 
        try { 
            h.endDocument();
        } catch (SAXException ex) {
            // ex.getException().printStackTrace(); 
            // ex.printStackTrace(); 
            throw new RuntimeException(ex.toString());
        } 
    }