Code example for SAXException

0
Map<String, EntityFactory> handlers = elementHandlers.peek();
        elementHandlers.push(new HashMap<String, EntityFactory>());
        EntityFactory factory = handlers.get(name);
        if (factory == null) {
            throw new SAXException(getLocatedMessage("No factory for element %s", name));
        } 
        factory.newElement(this, name, attributes);
    } 
 
    @Override 
    public void endElement(String uri, String localName, String name) throws SAXException
    { 
        elementHandlers.pop();
    } 
 
    @Override 
    public void setDocumentLocator(Locator locator)
    { 
        super.setDocumentLocator(locator);