Class ConformityChecker
java.lang.Object
io.github.oliviercailloux.jaris.xml.ConformityChecker
Helper for validating documents.
Instances of this class fail fast (throwing an exception) if encountering a warning, an error or a fatalError upon validating a document.
-
Method Summary
Modifier and TypeMethodDescriptionvoidverifyValid(Source document) Throws an exception iff the provided document is invalid.
-
Method Details
-
verifyValid
Throws an exception iff the provided document is invalid.- Parameters:
document- the document to validate.- Throws:
VerifyException- iff the document is invalid, equivalently, iff a warning, error or fatalError is encountered while validating the provided documentXmlException- if the Source is an XML artifact that the implementation cannot validate (for example, a processing instruction)IOException- if the validator is processing a javax.xml.transform.sax.SAXSource and the underlying org.xml.sax.XMLReader throws an IOException.
-