Package org.xmlunit.validation
Class JAXPValidator
java.lang.Object
org.xmlunit.validation.Validator
org.xmlunit.validation.JAXPValidator
Validator using the javax.xml.validation namespace.
An implementation detail of
javax.xml.validation.Validator leaks into this class: any
xsi:schemaLocation or xsi:noSchemaLocation attribute of
the instance document will be ignored if any schema source has been
set. This means you must either specify all sources or none of
them to successfully validate instances.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJAXPValidator(String language) JAXPValidator(String language, SchemaFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprivate SchemaFactoryprivate Schemafinal voidSets the schema to use in instance validation directly rather than viaValidator.setSchemaSource(javax.xml.transform.Source).Validates an instance against the schema.Validates a schema.Methods inherited from class org.xmlunit.validation.Validator
forLanguage, getSchemaSources, setSchemaSource, setSchemaSources
-
Field Details
-
language
-
factory
-
schema
-
-
Constructor Details
-
JAXPValidator
-
JAXPValidator
-
-
Method Details
-
setSchema
Sets the schema to use in instance validation directly rather than viaValidator.setSchemaSource(javax.xml.transform.Source).- Since:
- XMLUnit 2.3.0
-
getFactory
-
validateSchema
Description copied from class:ValidatorValidates a schema.- Specified by:
validateSchemain classValidator
-
validateInstance
Description copied from class:ValidatorValidates an instance against the schema.- Specified by:
validateInstancein classValidator
-
getSchema
- Throws:
SAXException
-