Interface XmlValidator
public interface XmlValidator
Simple processor that validates a given
Source
. Can be created via the XmlValidatorFactory
.
Instances of this class are designed to be thread safe.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionValidates the givenSource
, and returns an array ofSAXParseException
s as result.validate
(Source source, ValidationErrorHandler errorHandler) Validates the givenSource
andValidationErrorHandler
, and returns an array ofSAXParseException
s as result.
-
Method Details
-
validate
Validates the givenSource
, and returns an array ofSAXParseException
s as result. The array will be empty if no validation errors are found.- Parameters:
source
- the input document- Returns:
- an array of
SAXParseException
s - Throws:
IOException
- if thesource
cannot be readXmlValidationException
- if thesource
cannot be validated
-
validate
Validates the givenSource
andValidationErrorHandler
, and returns an array ofSAXParseException
s as result. The array will be empty if no validation errors are found.- Parameters:
source
- the input documenterrorHandler
- the error handler to use. May benull
, in which case a default will be used.- Returns:
- an array of
SAXParseException
s - Throws:
IOException
- if thesource
cannot be readXmlValidationException
- if thesource
cannot be validated
-