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:
parent
c4c613b5a8
commit
19c1c23dde
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue