JAVA-24151 Potential issue in "Validate an XML File Against an XSD File" article (#14675)

Co-authored-by: timis1 <noreplay@yahoo.com>
This commit is contained in:
timis1 2023-09-04 13:29:14 +03:00 committed by GitHub
parent c4c613b5a8
commit 19c1c23dde
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public class XmlValidator {
try {
validator.validate(new StreamSource(getFile(xmlPath)));
} catch (SAXParseException e) {}
xsdErrorHandler.getExceptions().forEach(e -> LOGGER.info(e.getMessage()));
xsdErrorHandler.getExceptions().forEach(e -> LOGGER.info(String.format("Line number: %s, Column number: %s. %s", e.getLineNumber(), e.getColumnNumber(), e.getMessage())));
return xsdErrorHandler.getExceptions();
}