|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.util.xml.XmlValidationModeDetector
public class XmlValidationModeDetector
Detects whether an XML stream is using DTD- or XSD-based validation.
Field Summary | |
---|---|
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). |
Constructor Summary | |
---|---|
XmlValidationModeDetector()
|
Method Summary | |
---|---|
int |
detectValidationMode(InputStream inputStream)
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 Detail |
---|
public static final int VALIDATION_NONE
public static final int VALIDATION_AUTO
public static final int VALIDATION_DTD
public static final int VALIDATION_XSD
Constructor Detail |
---|
public XmlValidationModeDetector()
Method Detail |
---|
public int detectValidationMode(InputStream inputStream) throws IOException
InputStream
.
Note that the supplied InputStream
is closed by this method before returning.
inputStream
- the InputStream to parse
IOException
- in case of I/O failureVALIDATION_DTD
,
VALIDATION_XSD
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |