private static Schema loadXmlSchema ( ) throws SAXException { InputStream schemaFileStream = findFileInClasspath ( CONFIG_SCHEMA_FILE_NAME ) ; Constraint . ensureNotNull ( schemaFileStream , "JCors configuration schema not found" ) ; SchemaFactory schemaFactory = SchemaFactory . newInstance ( XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; return schemaFactory . newSchema ( new StreamSource ( schemaFileStream ) ) ; }
Loads the XML validation schema from the classpath