public class XmlValidationModeDetector extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static int | VALIDATION_AUTOIndicates 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_DTDIndicates that DTD validation should be used (we found a "DOCTYPE" declaration). | 
| static int | VALIDATION_NONEIndicates that the validation should be disabled. | 
| static int | VALIDATION_XSDIndicates that XSD validation should be used (found no "DOCTYPE" declaration). | 
| Constructor and Description | 
|---|
| XmlValidationModeDetector() | 
| Modifier and Type | Method and Description | 
|---|---|
| int | detectValidationMode(InputStream inputStream)Detect the validation mode for the XML document in the supplied  InputStream. | 
public static final int VALIDATION_NONE
public static final int VALIDATION_AUTO
public static final int VALIDATION_DTD
public static final int VALIDATION_XSD
public int detectValidationMode(InputStream inputStream) throws IOException
InputStream.
 Note that the supplied InputStream is closed by this method before returning.inputStream - the InputStream to parseIOException - in case of I/O failureVALIDATION_DTD, 
VALIDATION_XSD