private DocumentBuilder getBuilderForSchema(DbfFactory.FacesSchema schema) throws Exception { factory.setSchema(schema.getSchema()); DocumentBuilder builder = factory.newDocumentBuilder(); builder.setEntityResolver(DbfFactory.FACES_ENTITY_RESOLVER); builder.setErrorHandler(DbfFactory.FACES_ERROR_HANDLER); return builder; }
private DocumentBuilder getBuilderForSchema(DbfFactory.FacesSchema schema) throws Exception { try { factory.setSchema(schema.getSchema()); } catch (UnsupportedOperationException upe) { return getNonValidatingBuilder(); } DocumentBuilder builder = factory.newDocumentBuilder(); builder.setEntityResolver(DbfFactory.FACES_ENTITY_RESOLVER); builder.setErrorHandler(DbfFactory.FACES_ERROR_HANDLER); return builder; }