In general create the {@link InputSource} to be passed to the parser like:
InputSource is = new InputSource(loader.openSchema(name)); is.setSystemId(SystemIdResolver.createSystemIdFromResourceName(name)); final DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); db.setEntityResolver(new SystemIdResolver(loader)); Document doc = db.parse(is);
|
|
|
|
|
|
|
|