Class DefaultDocumentLoader
java.lang.Object
org.springframework.webflow.engine.model.builder.xml.DefaultDocumentLoader
- All Implemented Interfaces:
DocumentLoader
The default document loader strategy for XSD-based XML documents with validation enabled by default.
Note: full XSD support requires JDK 5.0 or a capable parser such as Xerces 2.0. JDK 1.4 or less do not fully support XSD
out of the box. To use this implementation on JDK 1.4 make sure Xerces is available in your classpath or disable XSD
validation by setting the validating property to false
.
- Author:
- Keith Donald
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the SAX entity resolver used by the XML parser.boolean
Returns whether or not the XML parser will validate the document.loadDocument
(org.springframework.core.io.Resource resource) Load the XML-based document from the external resource.void
setEntityResolver
(EntityResolver entityResolver) Set a SAX entity resolver to be used for parsing.void
setValidating
(boolean validating) Set if the XML parser should validate the document and thus enforce a schema.
-
Constructor Details
-
DefaultDocumentLoader
public DefaultDocumentLoader()
-
-
Method Details
-
isValidating
public boolean isValidating()Returns whether or not the XML parser will validate the document. -
setValidating
public void setValidating(boolean validating) Set if the XML parser should validate the document and thus enforce a schema. Defaults to true. -
getEntityResolver
Returns the SAX entity resolver used by the XML parser. -
setEntityResolver
Set a SAX entity resolver to be used for parsing. Can be overridden for custom entity resolution, for example relative to some specific base path. -
loadDocument
public Document loadDocument(org.springframework.core.io.Resource resource) throws IOException, ParserConfigurationException, SAXException Description copied from interface:DocumentLoader
Load the XML-based document from the external resource.- Specified by:
loadDocument
in interfaceDocumentLoader
- Parameters:
resource
- the document resource- Returns:
- the loaded (parsed) document
- Throws:
IOException
- an exception occured accessing the resource input streamParserConfigurationException
- an exception occured building the document parserSAXException
- a error occured during document parsing
-