code: public static String getAttrVal(final NamedNodeMap nnm, final String name) {
      Node nmAttr = nnm.getNamedItem(name);
  
      if ((nmAttr == null) || (absent(nmAttr.getNodeValue()))) {
        return null;
      }
  
      return nmAttr.getNodeValue();
    }
docs: Return the attribute value of the named attribute from the given map.
  
  @param nnm         NamedNodeMap
  @param name        String name of desired attribute
  @return String     attribute value or null