Class SchemaLoaderUtils
java.lang.Object
org.springframework.xml.validation.SchemaLoaderUtils
Convenient utility methods for loading of 
Schema objects, performing standard handling of input streams.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringgetSystemId(org.springframework.core.io.Resource resource) Retrieves the URL from the given resource as System ID.static SchemaloadSchema(org.springframework.core.io.Resource[] resources, String schemaLanguage) Load schema from the given resource.static SchemaloadSchema(org.springframework.core.io.Resource resource, String schemaLanguage) Load schema from the given resource.
- 
Constructor Details- 
SchemaLoaderUtilspublic SchemaLoaderUtils()
 
- 
- 
Method Details- 
loadSchemapublic static Schema loadSchema(org.springframework.core.io.Resource resource, String schemaLanguage) throws IOException, SAXException Load schema from the given resource.- Parameters:
- resource- the resource to load from
- schemaLanguage- the language of the schema. Can be- XMLConstants.W3C_XML_SCHEMA_NS_URIor- XMLConstants.RELAXNG_NS_URI.
- Throws:
- IOException- if loading failed
- SAXException- if loading failed
- See Also:
 
- 
loadSchemapublic static Schema loadSchema(org.springframework.core.io.Resource[] resources, String schemaLanguage) throws IOException, SAXException Load schema from the given resource.- Parameters:
- resources- the resources to load from
- schemaLanguage- the language of the schema. Can be- XMLConstants.W3C_XML_SCHEMA_NS_URIor- XMLConstants.RELAXNG_NS_URI.
- Throws:
- IOException- if loading failed
- SAXException- if loading failed
- See Also:
 
- 
getSystemIdRetrieves the URL from the given resource as System ID. Returnsnullif it cannot be opened.
 
-