Class 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.
Since:
2.0
Author:
Rob Harrop, Juergen Hoeller, Sam Brannen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    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 final int
    Indicates that DTD validation should be used (we found a "DOCTYPE" declaration).
    static final int
    Indicates that the validation should be disabled.
    static final int
    Indicates that XSD validation should be used (found no "DOCTYPE" declaration).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Detect the validation mode for the XML document in the supplied InputStream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VALIDATION_NONE

      public static final int VALIDATION_NONE
      Indicates that the validation should be disabled.
      See Also:
    • 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).
      See Also:
    • VALIDATION_DTD

      public static final int VALIDATION_DTD
      Indicates that DTD validation should be used (we found a "DOCTYPE" declaration).
      See Also:
    • VALIDATION_XSD

      public static final int VALIDATION_XSD
      Indicates that XSD validation should be used (found no "DOCTYPE" declaration).
      See Also:
  • Constructor Details

    • XmlValidationModeDetector

      public XmlValidationModeDetector()
  • Method Details