public class ParsingValidator extends Validator
Even though this implementation supports W3C Schema you shouldn't use it for that language but rather use JAXPValidator.
| Modifier and Type | Class and Description |
|---|---|
private class |
ParsingValidator.Handler |
private static class |
ParsingValidator.Properties |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
language |
private java.lang.String |
schemaURI |
| Constructor and Description |
|---|
ParsingValidator(java.lang.String language) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getSchemaURI()
The URI (or for example the System ID in case of a DTD) that
identifies the schema validated or used during validation.
|
void |
setSchemaURI(java.lang.String uri)
The URI (or for example the System ID in case of a DTD) that
identifies the schema to validate or use during validation.
|
ValidationResult |
validateInstance(javax.xml.transform.Source s)
Validates an instance against the schema.
|
ValidationResult |
validateInstance(javax.xml.transform.Source s,
javax.xml.parsers.SAXParserFactory factory)
Validates an instance against the schema using a pre-configured
SAXParserFactory. |
ValidationResult |
validateSchema()
ParsingValidator doesn't support validation of the
schema itself. |
forLanguage, getSchemaSources, setSchemaSource, setSchemaSourcesprivate final java.lang.String language
private java.lang.String schemaURI
public void setSchemaURI(java.lang.String uri)
protected java.lang.String getSchemaURI()
public ValidationResult validateSchema()
ParsingValidator doesn't support validation of the
schema itself.validateSchema in class ValidatorXMLUnitException - alwayspublic ValidationResult validateInstance(javax.xml.transform.Source s)
ValidatorvalidateInstance in class Validatorpublic ValidationResult validateInstance(javax.xml.transform.Source s, javax.xml.parsers.SAXParserFactory factory)
SAXParserFactory.
The factory given will be configured to be namespace aware and validating.
s - the instance documentfactory - the factory to use, must not be null