DocumentLoader implementation.
Simply loads documents using the standard JAXP-configured
XML parser. If you want to change the DocumentBuilder that is used to
load documents, then one strategy is to define a corresponding Java system property
when starting your JVM. For example, to use the Oracle DocumentBuilder,
you might start your application like as follows:
java -Djavax.xml.parsers.DocumentBuilderFactory=oracle.xml.jaxp.JXDocumentBuilderFactory MyMainClass
| Modifier and Type | Field and Description |
|---|---|
| private static final Log | |
| private static final String | SCHEMA_LANGUAGE_ATTRIBUTE
JAXP attribute used to configure the schema language for validation. |
| private static final String | XSD_SCHEMA_LANGUAGE
JAXP attribute value indicating the XSD schema language. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected DocumentBuilder | Returns: the JAXP DocumentBuilderthe JAXP DocumentBuilderFactory that the DocumentBuilder
should be created with factory, EntityResolver the SAX EntityResolver to use entityResolver, ErrorHandler the SAX ErrorHandler to use errorHandler)Create a JAXP DocumentBuilder that this bean definition reader will use for parsing XML documents. |
| protected DocumentBuilderFactory | Returns: the JAXP DocumentBuilderFactorywhether the returned factory is to provide support for XML namespaces namespaceAware)Create the |
| public Document | loadDocument(InputSource
the source of the document that is to be loaded inputSource, EntityResolver the resolver that is to be used to resolve any entities entityResolver, ErrorHandler used to report any errors during document loading errorHandler, int validationMode, boolean true if support for XML namespaces is to be providedImplements org. Load the |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| SCHEMA_LANGUAGE_ATTRIBUTE | back to summary |
|---|---|
| private static final String SCHEMA_LANGUAGE_ATTRIBUTE JAXP attribute used to configure the schema language for validation. | |
| XSD_SCHEMA_LANGUAGE | back to summary |
|---|---|
| private static final String XSD_SCHEMA_LANGUAGE JAXP attribute value indicating the XSD schema language. | |
| DefaultDocumentLoader | back to summary |
|---|---|
| public DefaultDocumentLoader() | |
| createDocumentBuilder | back to summary |
|---|---|
| protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory, EntityResolver entityResolver, ErrorHandler errorHandler) throws ParserConfigurationException Create a JAXP DocumentBuilder that this bean definition reader will use for parsing XML documents. Can be overridden in subclasses, adding further initialization of the builder.
| |
| createDocumentBuilderFactory | back to summary |
|---|---|
| protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode, boolean namespaceAware) throws ParserConfigurationException Create the
| |