Code example for ContentHandler

Methods: endElement

0
                throw new IllegalArgumentException("unknown end element: " + uri + " " + localName + " " + qName);
            } 
        } 
        content.setLength(0);
        if (contentHandler != null) {
            contentHandler.endElement(uri, localName, qName);
        } 
    } 
 
    @Override 
    public void characters(char[] ch, int start, int length) throws SAXException {
        String s = new String(ch, start, length);
        if (!s.trim().isEmpty()) {
            content.append(s);
        } 
        if (contentHandler != null) {
            contentHandler.characters(ch, start, length);
        } 
    } 
 
    @Override