code: public List<SAXParseException> getInstanceErrors(Source instance) {
          try {
              return problemToExceptionList(validator.validateInstance(instance).
                                            getProblems());
          } catch (XMLUnitException e) {
              throw new XMLUnitRuntimeException(e.getMessage(), e.getCause());
          }
      }
docs: Obtain a list of all errors in the given instance.
  
  <p>The list contains {@link org.xml.sax.SAXParseException
  SAXParseException}s.</p>
  
  @throws XMLUnitRuntimeException if the schema definition is
  invalid or the Source is a SAXSource and the underlying
  XMLReader throws an IOException (see {@link
  javax.xml.validation.Validator#validate validate in
  Validator}).