From 19c1c23dde1e53ed5a01ab361d657a0b7adab8e3 Mon Sep 17 00:00:00 2001 From: timis1 <12120641+timis1@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:29:14 +0300 Subject: [PATCH] JAVA-24151 Potential issue in "Validate an XML File Against an XSD File" article (#14675) Co-authored-by: timis1 --- .../src/main/java/com/baeldung/xml/validation/XmlValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml-2/src/main/java/com/baeldung/xml/validation/XmlValidator.java b/xml-2/src/main/java/com/baeldung/xml/validation/XmlValidator.java index 7d8f531bfa..57eccab193 100644 --- a/xml-2/src/main/java/com/baeldung/xml/validation/XmlValidator.java +++ b/xml-2/src/main/java/com/baeldung/xml/validation/XmlValidator.java @@ -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(); }