code: public Element toRootElement() {
          Document doc = null;
          try {
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              dbf.setNamespaceAware(true);
              DocumentBuilder db = dbf.newDocumentBuilder();
              doc = db.newDocument();
          } catch (Exception e) {
              jlogger.log(Level.SEVERE, "validate", e);
              e.printStackTrace();
              // Fortify Mod: if we get here then there is no point in going further
              return null;
          }
          Element root = doc.createElement("errors");
          doc.appendChild(root);
          ErrorIterator errIterator = iterator();
          while (errIterator.hasNext()) {
              ValidationError err = errIterator.next();
              Element elem = doc.createElement("error");
              elem.setTextContent(err.getMessage());
              root.appendChild(elem);
          }
          return root;
      }
docs: Returns validation errors in a root container node.
  The root container ({@code <errors>}) contains a list
  of {@code <error>} elements containing error
  messages as text content.
  
  @return Root element containing list of errors