Package com.io7m.jxe.core
Class JXEHardenedSAXParsers
java.lang.Object
com.io7m.jxe.core.JXEHardenedSAXParsers
A provider of hardened SAX parsers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateXMLReader
(Optional<Path> base_directory, JXEXInclude xinclude, JXESchemaResolutionMappings in_schemas) Create a XSD-validating XML reader.createXMLReaderNonValidating
(Optional<Path> base_directory, JXEXInclude xinclude) Create a non-validating XML reader.
-
Constructor Details
-
JXEHardenedSAXParsers
public JXEHardenedSAXParsers()Construct a provider.
-
-
Method Details
-
createXMLReaderNonValidating
public XMLReader createXMLReaderNonValidating(Optional<Path> base_directory, JXEXInclude xinclude) throws ParserConfigurationException, SAXException Create a non-validating XML reader.- Parameters:
base_directory
- A directory that will contain parsed resources, if anyxinclude
- A specification of whether or not XInclude should be enabled- Returns:
- A new non-validating XML reader
- Throws:
ParserConfigurationException
- On parser configuration errorsSAXException
- On SAX parser errors
-
createXMLReader
public XMLReader createXMLReader(Optional<Path> base_directory, JXEXInclude xinclude, JXESchemaResolutionMappings in_schemas) throws ParserConfigurationException, SAXException Create a XSD-validating XML reader.- Parameters:
xinclude
- A specification of whether or not XInclude should be enabled for parsersbase_directory
- A directory that will contain parsed resourcesin_schemas
- A set of schemas that will be consulted for validation- Returns:
- A new XSD-validating XML reader
- Throws:
ParserConfigurationException
- On parser configuration errorsSAXException
- On SAX parser errors
-