public class XsdValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SCHEMA_FACTORY |
| Constructor and Description |
|---|
XsdValidator() |
| Modifier and Type | Method and Description |
|---|---|
void |
setErrorHandler(ErrorHandler errorHandler)
Set the validation error handler.
|
void |
setSchemaFactory(SchemaFactory installedSchemaFactory) |
void |
setSchemaSourceResolver(LSResourceResolver schemaSourceResolver) |
void |
setXSDSources(Collection<Source> xsdSources)
Set the XSD/Schema Sources.
|
void |
validate(Source source)
Validate the supplied source against the namespaces referenced in it.
|
public static final String SCHEMA_FACTORY
public void setSchemaFactory(SchemaFactory installedSchemaFactory)
public void setSchemaSourceResolver(LSResourceResolver schemaSourceResolver) throws SAXException
SAXExceptionpublic void setXSDSources(Collection<Source> xsdSources) throws SAXException
xsdSources - The schema sources.SAXExceptionpublic void setErrorHandler(ErrorHandler errorHandler)
errorHandler - The validation error handler.public void validate(Source source) throws SAXException, IOException
SAXException - Validation error.IOException - Error reading the XSD Sources.Copyright © 2020. All rights reserved.