SAXパーサーからすべての検証エラーを取得したいのですが、私のスニペットでは最初のエラーしか受け取りません。どうすればこれを達成できますか?
ありがとうございました!
スニペット
def factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)
def xml = new StreamSource(inputStream)
def xsd = new StreamSource(new FileReader(schema), systemId)
try {
factory?.newSchema(xsd)?.newValidator()?.validate(xml)
} catch(SAXParseException saxpe) {
continueImport = false
log.error("Error while parsing the import xml", saxpe)
}