Code example for SAXNotRecognizedException

0
 
    public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
        if ("http://xml.org/sax/properties/lexical-handler".equals(name)) {
            lexicalHandler = (LexicalHandler) value;
        } else { 
            throw new SAXNotRecognizedException(name);
        } 
    } 
 
    public void setEntityResolver(EntityResolver resolver) {
    } 
 
    public EntityResolver getEntityResolver() {
        return null; 
    } 
 
    public void setDTDHandler(DTDHandler handler) {
    } 
 
    public DTDHandler getDTDHandler() {
        return null;