code: private List<HashMap<String, String>> createRowsHashMap(Document doc, String tableName) {
  
          List<HashMap<String, String>> result = new ArrayList<>();
  
          NodeList nl = doc.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;
              }
  
              if (n.hasChildNodes()) {
                  NodeList child = n.getChildNodes();
                  HashMap<String, String> hash = new HashMap<>();
                  result.add(hash);
                  for (int j = 0; j < child.getLength(); j++) {
                      Node childNode = child.item(j);
  
                      if (childNode.getNodeType() != Node.ELEMENT_NODE) {
                          continue;
                      }
                      //System.out.println("childNode is :" + childNode.getNodeName() + " with value " + childNode.getTextContent
                      // ());
                      hash.put(childNode.getNodeName(), childNode.getTextContent());
                  }
              }
          }
          return result;
      }
docs: Create a structure to store all the rows and key/value for the specified document
  
  @param doc the specified Document
  @return a List containing all the rows and the key/value pairs