public void setEntityBaseUrl ( final URL base ) { reader . setEntityResolver ( new EntityResolver ( ) { public InputSource resolveEntity ( final String publicId , final String systemId ) throws IOException { return new InputSource ( new URL ( base , systemId ) . openStream ( ) ) ; } } ) ; }
Resolves entities against using the supplied URL as the base for relative URLs