code: public boolean compare(Document doc1, Document doc2, String tableName) {
          NodeList nl = doc1.getElementsByTagName("Row");
          for (int i = 0; i < nl.getLength(); i++) {
              Node n = nl.item(i);
              // check if the rows belongs to the table name
              Node tableNodeNameAttr = n.getParentNode().getAttributes().getNamedItem("name");
              String tableNameAttr = tableNodeNameAttr.getNodeValue();
              if (!tableNameAttr.equals(tableName)) {
                  continue;
              }
              Node tableNodeKeyAttr = n.getParentNode().getAttributes().getNamedItem("key");
              String tableKeyAttr = tableNodeKeyAttr.getNodeValue();
              String[] primaryKeyFields = new String[] {tableKeyAttr};
              return compare(doc1, doc2, tableName, primaryKeyFields);
  
          }
          return true; // table is not to be compared (not found)
      }
docs: Check that all the rows and elements defined in the doc1 are included in doc2
  
  @param doc1 The source document
  @param doc2 The checked document
  @return True if all the elements defined in the doc1 exists in the doc2