code: public static String getAttributeValue(final Element element, final String name) {
          final Node node = element.getAttributes().getNamedItem(name);
          if (node != null) {
              return node.getNodeValue();
          }
  
          return null;
      }
docs: Returns the attribute value for the given attribute name.
  
  @param element
  the w3c dom element.
  @param name
  the attribute name
  @return if present, the the extracted attribute value, otherwise null.