Code example for EntityResolver

Methods: resolveEntity

0
                System.logI("Could not resolve '" + systemId + "' relative to"
                        + " '" + this.systemId + "' at " + locator, e);
            } 
        } 
 
        InputSource inputSource = entityResolver.resolveEntity(
                publicId, systemId);
        if (inputSource == null) {
            /* 
             * The spec. actually says that we should try to treat systemId 
             * as a URL and download and parse its contents here, but an 
             * entity resolver can easily accomplish the same by returning 
             * new InputSource(systemId). 
             * 
             * Downloading external entities by default would result in several 
             * unwanted DTD downloads, not to mention pose a security risk 
             * when parsing untrusted XML -- see for example 
             * http://archive.cert.uni-stuttgart.de/bugtraq/2002/10/msg00421.html -- 
             * so we just do nothing instead. This also enables the user to 
             * opt out of entity parsing when using 
             * {@link org.xml.sax.helpers.DefaultHandler}, something that