org.springframework.util.xml

## 类 XmlValidationModeDetector

- java.lang.Object
- - org.springframework.util.xml.XmlValidationModeDetector

-     public class XmlValidationModeDetector
      extends Object

  Detects whether an XML stream is using DTD- or XSD-based validation.
  从以下版本开始:
    2.0
  作者:
    Rob Harrop, Juergen Hoeller

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static int` | `VALIDATION_AUTO` Indicates that the validation mode should be auto-guessed, since we cannot find a clear indication (probably choked on some special characters, or the like).
    `static int` | `VALIDATION_DTD` Indicates that DTD validation should be used (we found a "DOCTYPE" declaration).
    `static int` | `VALIDATION_NONE` Indicates that the validation should be disabled.
    `static int` | `VALIDATION_XSD` Indicates that XSD validation should be used (found no "DOCTYPE" declaration).

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `detectValidationMode(InputStream inputStream)` Detect the validation mode for the XML document in the supplied `InputStream`.

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

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

- - ### 字段详细资料

    - #### VALIDATION_NONE

          public static final int VALIDATION_NONE

      Indicates that the validation should be disabled.
      另请参阅:
        常量字段值

    - #### VALIDATION_AUTO

          public static final int VALIDATION_AUTO

      Indicates that the validation mode should be auto-guessed, since we cannot find a clear indication (probably choked on some special characters, or the like).
      另请参阅:
        常量字段值

    - #### VALIDATION_DTD

          public static final int VALIDATION_DTD

      Indicates that DTD validation should be used (we found a "DOCTYPE" declaration).
      另请参阅:
        常量字段值

    - #### VALIDATION_XSD

          public static final int VALIDATION_XSD

      Indicates that XSD validation should be used (found no "DOCTYPE" declaration).
      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### XmlValidationModeDetector

          public XmlValidationModeDetector()

  - ### 方法详细资料

    - #### detectValidationMode

          public int detectValidationMode(InputStream inputStream)
                                   throws IOException

      Detect the validation mode for the XML document in the supplied `InputStream`. Note that the supplied `InputStream` is closed by this method before returning.
      参数:
        `inputStream` - the InputStream to parse
      抛出:
        `IOException` - in case of I/O failure
      另请参阅:
        `VALIDATION_DTD`, `VALIDATION_XSD`