public abstract class Validator extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Validator()
Creates a validator.
|
| Modifier and Type | Method and Description |
|---|---|
static Validator |
forLanguage(String language)
Factory that obtains a Validator instance based on the schema language.
|
protected Source[] |
getSchemaSources()
Where to find the schema.
|
void |
setSchemaSource(Source s)
Where to find the schema.
|
void |
setSchemaSources(Source... s)
Where to find the schema.
|
abstract ValidationResult |
validateInstance(Source instance)
Validates an instance against the schema.
|
abstract ValidationResult |
validateSchema()
Validates a schema.
|
public void setSchemaSources(Source... s)
s - locations of the schema definitionpublic final void setSchemaSource(Source s)
s - location of the schema definitionprotected Source[] getSchemaSources()
public abstract ValidationResult validateSchema()
UnsupportedOperationException - if the language's
implementation doesn't support schema validationpublic abstract ValidationResult validateInstance(Source instance)
instance - the instance to validateCopyright © 2001–2025 XMLUnit. All rights reserved.