code: public static boolean validateTables(final Document doc) {
          final NodeList tables = doc.getElementsByTagName("table");
          for (int i = 0; i < tables.getLength(); i++) {
              final Element table = (Element) tables.item(i);
              if (!validateTableRows(table)) {
                  return false;
              }
          }
  
          final NodeList informalTables = doc.getElementsByTagName("informaltable");
          for (int i = 0; i < informalTables.getLength(); i++) {
              final Element informalTable = (Element) informalTables.item(i);
              if (!validateTableRows(informalTable)) {
                  return false;
              }
          }
  
          return true;
      }
docs: Checks to see if the Rows, in XML Tables exceed the maximum number of columns.
  
  @param doc The XML DOM Document to be validated.
  @return True if the XML is valid, otherwise false.