public class ParsingValidator extends Validator
Even though this implementation supports W3C Schema you shouldn't use it for that language but rather use JAXPValidator.
Constructor and Description |
---|
ParsingValidator(String language) |
Modifier and Type | Method and Description |
---|---|
protected 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(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(Source s)
Validates an instance against the schema.
|
ValidationResult |
validateInstance(Source s,
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, setSchemaSources
public ParsingValidator(String language)
public void setSchemaURI(String uri)
protected String getSchemaURI()
public ValidationResult validateSchema()
ParsingValidator
doesn't support validation of the
schema itself.validateSchema
in class Validator
XMLUnitException
- alwayspublic ValidationResult validateInstance(Source s)
Validator
validateInstance
in class Validator
public ValidationResult validateInstance(Source s, 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 nullCopyright © 2001–2018 XMLUnit. All rights reserved.