org.springframework.beans.factory.xml

## 类 DefaultDocumentLoader

- java.lang.Object
- - org.springframework.beans.factory.xml.DefaultDocumentLoader

- 所有已实现的接口:
    DocumentLoader

      public class DefaultDocumentLoader
      extends Object
      implements DocumentLoader

  Spring's default `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

  从以下版本开始:
    2.0
  作者:
    Rob Harrop, Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `DefaultDocumentLoader()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected DocumentBuilder` | `createDocumentBuilder(DocumentBuilderFactory factory, EntityResolver entityResolver, ErrorHandler errorHandler)` Create a JAXP DocumentBuilder that this bean definition reader will use for parsing XML documents.
    `protected DocumentBuilderFactory` | `createDocumentBuilderFactory(int validationMode, boolean namespaceAware)` Create the `DocumentBuilderFactory` instance.
    `Document` | `loadDocument(InputSource inputSource, EntityResolver entityResolver, ErrorHandler errorHandler, int validationMode, boolean namespaceAware)` Load the `Document` at the supplied `InputSource` using the standard JAXP-configured XML parser.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### DefaultDocumentLoader

          public DefaultDocumentLoader()

  - ### 方法详细资料

    - #### loadDocument

          public Document loadDocument(InputSource inputSource,
                                       EntityResolver entityResolver,
                                       ErrorHandler errorHandler,
                                       int validationMode,
                                       boolean namespaceAware)
                                throws Exception

      Load the `Document` at the supplied `InputSource` using the standard JAXP-configured XML parser.
      指定者:
        `loadDocument` 在接口中 `DocumentLoader`
      参数:
        `inputSource` - the source of the document that is to be loaded
        `entityResolver` - the resolver that is to be used to resolve any entities
        `errorHandler` - used to report any errors during document loading
        `validationMode` - the type of validation `DTD` or `XSD`)
        `namespaceAware` - `true` if support for XML namespaces is to be provided
      返回:
        the loaded `document`
      抛出:
        `Exception` - if an error occurs

    - #### createDocumentBuilderFactory

          protected DocumentBuilderFactory createDocumentBuilderFactory(int validationMode,
                                                                        boolean namespaceAware)
                                                                 throws ParserConfigurationException

      Create the `DocumentBuilderFactory` instance.
      参数:
        `validationMode` - the type of validation: `DTD` or `XSD`)
        `namespaceAware` - whether the returned factory is to provide support for XML namespaces
      返回:
        the JAXP DocumentBuilderFactory
      抛出:
        `ParserConfigurationException` - if we failed to build a proper DocumentBuilderFactory

    - #### createDocumentBuilder

          protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory,
                                                          @Nullable
                                                          EntityResolver entityResolver,
                                                          @Nullable
                                                          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.
      参数:
        `factory` - the JAXP DocumentBuilderFactory that the DocumentBuilder should be created with
        `entityResolver` - the SAX EntityResolver to use
        `errorHandler` - the SAX ErrorHandler to use
      返回:
        the JAXP DocumentBuilder
      抛出:
        `ParserConfigurationException` - if thrown by JAXP methods