code: public static Map<String, String> convertToAttributeMap(NamedNodeMap _nodeMap) {
          Map<String, String> map = new LinkedHashMap<>();
          for (int i = 0; i < _nodeMap.getLength(); i++) {
              Node node = _nodeMap.item(i);
              map.put(node.getNodeName(), node.getNodeValue());
          }
          return map;
      }
docs: Converts {@link NamedNodeMap} to a {@link LinkedHashMap}&lt;String,String&gt;.
  @param _nodeMap node map
  @return {@link LinkedHashMap}, maybe empty but never null