Package org.xmlunit.validation
Class ParsingValidator
java.lang.Object
org.xmlunit.validation.Validator
org.xmlunit.validation.ParsingValidator
Validator implementation that uses "the old way" of validating an
XML input by parsing the input.
Even though this implementation supports W3C Schema you shouldn't use it for that language but rather use JAXPValidator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringThe URI (or for example the System ID in case of a DTD) that identifies the schema validated or used during validation.voidsetSchemaURI(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.Validates an instance against the schema.validateInstance(Source s, SAXParserFactory factory) Validates an instance against the schema using a pre-configuredSAXParserFactory.ParsingValidatordoesn't support validation of the schema itself.Methods inherited from class org.xmlunit.validation.Validator
forLanguage, getSchemaSources, setSchemaSource, setSchemaSources
-
Field Details
-
language
-
schemaURI
-
-
Constructor Details
-
ParsingValidator
-
-
Method Details
-
setSchemaURI
The URI (or for example the System ID in case of a DTD) that identifies the schema to validate or use during validation. -
getSchemaURI
The URI (or for example the System ID in case of a DTD) that identifies the schema validated or used during validation. -
validateSchema
ParsingValidatordoesn't support validation of the schema itself.- Specified by:
validateSchemain classValidator- Throws:
XMLUnitException- always
-
validateInstance
Description copied from class:ValidatorValidates an instance against the schema.- Specified by:
validateInstancein classValidator
-
validateInstance
Validates an instance against the schema using a pre-configuredSAXParserFactory.The factory given will be configured to be namespace aware and validating.
- Parameters:
s- the instance documentfactory- the factory to use, must not be null- Since:
- XMLUnit 2.6.0
-