title: Validate COMPLETE XML Against XSD
body: <p>I want to validate my XML against my XSD <strong>COMPLETELY</strong>, meaning that I want the file to continue validating from the same point where it had thrown an exception. </p>
  
  <p>This is my code :</p>
  
  <pre><code>public void validate(File file) {
      try {
  
          Source xmlFile = new StreamSource(file);
  
          try {
  
              System.out.println("Processing : " + file.getAbsolutePath());
              System.out.println(validator);
              validator.validate(xmlFile);
              // stringBuffer.append(" is valid");
          } catch (SAXException e) {
              fileWriter.write("\n\n\n" + file.getAbsolutePath());
              System.out.println(xmlFile.getSystemId() + " is NOT valid");
              System.out.println("Reason: " + e.getLocalizedMessage());
              fileWriter.write("\nReason: " + e.getLocalizedMessage());
  
              if (e instanceof SAXParseException) {
                  fileWriter.write(" (Line : "
                          + ((SAXParseException) e).getLineNumber()
                          + ", Col : "
                          + ((SAXParseException) e).getColumnNumber() + ")");
              }
  
              fileWriter.flush();
              validate(file);
          }
      } catch (Exception exception) {
          exception.printStackTrace(System.out);
      }
  }
  </code></pre>
  
  <p>Here according to this snippet, after JUST ONE EXCEPTION the code returns the error and stops validating further XML.. But is there any way to get all the errors of the XML against the XSD? In short to continue validating from the cursor where it had thrown an exception.
  ANY WAY OUT?? </p>
  
  <p>Thanks!</p>