use of nokogiri.internals.IgnoreSchemaErrorsErrorHandler in project gocd by gocd.
the class XmlSchema method getSchema.
private Schema getSchema(Source source, String currentDir, String scriptFileName) throws SAXException {
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
SchemaResourceResolver resourceResolver = new SchemaResourceResolver(currentDir, scriptFileName, null);
schemaFactory.setResourceResolver(resourceResolver);
schemaFactory.setErrorHandler(new IgnoreSchemaErrorsErrorHandler());
return schemaFactory.newSchema(source);
}
use of nokogiri.internals.IgnoreSchemaErrorsErrorHandler in project nokogiri by sparklemotion.
the class XmlSchema method getSchema.
private Schema getSchema(Source source, String currentDir, String scriptFileName) throws SAXException {
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
SchemaResourceResolver resourceResolver = new SchemaResourceResolver(currentDir, scriptFileName, null);
schemaFactory.setResourceResolver(resourceResolver);
schemaFactory.setErrorHandler(new IgnoreSchemaErrorsErrorHandler());
return schemaFactory.newSchema(source);
}
Aggregations