Package org.openpreservation.format.xml
Class XmlValidator
java.lang.Object
org.openpreservation.format.xml.XmlValidator
Simple class to wrap XML schema vaidaton.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvalidate
(ParseResult parseResult, InputStream toValidate, Schema schema) Validate the supplied InputStream against the supplied schema.
-
Constructor Details
-
XmlValidator
public XmlValidator()
-
-
Method Details
-
validate
public ValidationResult validate(ParseResult parseResult, InputStream toValidate, Schema schema) throws IOException Validate the supplied InputStream against the supplied schema.- Parameters:
parseResult
- theParseResult
obtained form parsign the file usingXmlParser
toValidate
- anInputStream
to validateschema
- theSchema
to validate against- Returns:
- a
ValidationResult
containing the result of the validation - Throws:
IOException
- if there is an error reading suppliedInputStream
.
-