Code example for EntityResolver

Methods: resolveEntity

0
        @Override 
        public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
            // If we have an explicit entity resolver, delegate to it 
            if (entityResolver != null) {
                try { 
                    return entityResolver.resolveEntity(publicId, systemId);
                } 
                catch (IOException e) {
                    throw new SAXException(e);
                } 
            } 
            try { 
                return super.resolveEntity(publicId, systemId);
            } catch (Exception e) {
                throw new SAXException(e);
            } 
        } 
    } 
}