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.
438518
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;
    }
1168090
public Object getAttributeValue(FeatureDescriptor feature,
                                    String attributeName) {

        if (feature == null || attributeName == null) {
            return null;
        }

        return feature.getValue(attributeName);
    }
953714
public Node getNamedItem(String name)
  {

    for (int n = dtm.getFirstAttribute(element); n != DTM.NULL;
            n = dtm.getNextAttribute(n))
    {
      if (dtm.getNodeName(n).equals(name))
        return dtm.getNode(n);
    }

    return null;
  }
1193400
public String extractName(XAttributable element) {
		XAttribute attribute = element.getAttributes().get(KEY_NAME);
		if (attribute == null) {
			return null;
		} else {
			return ((XAttributeLiteral) attribute).getValue();
		}
	}
181456
public T getData(String name) {
        Node<T> node = root.getNode(name);
        return node == null ? null : node.getData();
    }
697788
public String getValue(String name) {
		String result = null;
		for (InitParam initParam : initParams) {
			if (initParam.getName().equals(name)) {
				result = initParam.getValue();
				break;
			}
		}
		return result;
	}
24
@Api
	public void getValue(String name, ShortAttribute attribute) {
		attribute.setValue(toShort(formWidget.getValue(name)));
	}
812833
@CheckForNull
    public Node getNode(String name) {
        return name == null ? null : nodes.get(name);
    }
940905
public String getAttribute(String name, String def) {
		String value = dom.getAttribute(name);
		if ((value == null) || (value.length() == 0)) {
			return def;
		}
		
		return value;
	}
776593
public String getAttributeValue(final String name) {
        final List<Attribute> attributes = Collections.synchronizedList(getAttributes());
        for (int i = 0; i < attributes.size(); i++) {
            final Attribute a = attributes.get(i);

            if (a.getName() != null && a.getName().equals(name)) {
                return a.getValue();
            }
        }
        return null;
    }
662133
public static Element getChildElementByName(Element parent, String name)
    {
        NodeList children = parent.getChildNodes();

        for(int i = 0; i < children.getLength(); i++) {
            Node node = children.item(i);
            if(node.getNodeType() == Node.ELEMENT_NODE) {
                Element element = (Element) node;
                if(element.getTagName().equals(name)) {
                    return element;
                }
            }
        }

        return null;
    }
1214458
public String getString(T name) {
         return (attributes.containsKey(name)) ? attributes.get(name)[0] : null;
    }
1355894
private Attribute extract(String name) {
		final AttributeValue value;
		if (this.cache.containsKey(name)) {
			value = this.cache.get(name);
		} else {
			final ManyValueAttributeValue result = new ManyValueAttributeValue();
			AttributeValue attrValue;
			for (final AttributeProvider c : this.containers) {
				attrValue = c.getAttribute(name);
				assign(result, attrValue);
			}
			value = canonize(result);
			this.cache.put(name, value);
		}
		return (value != null) ? new AttributeImpl(name, value) : null;
	}
817329
public static String getValue(Element element) {
        if (element != null) {
            Node dataNode = element.getFirstChild();
            if (dataNode != null) {
                return ((Text) dataNode).getData();
            }
        }
        return null;
    }
443511
private String getRequiredAttribute(Element node, String name) {
        String value = node.getAttribute(name);
        
        if (value.isEmpty()) {
            throw new IllegalArgumentException("Missing " + name + " attribute on node: " + node.getTagName());
        }
        
        return value;
    }
744514
public static Element getElement(Element element, String tagName) {
		final NodeList nodeList = element.getElementsByTagName(tagName);
		if (nodeList == null || nodeList.getLength() < 1) {
			return null;
		}
		int length = nodeList.getLength();
		for (int i = 0; i < length; i++) {
			Element childEle = (Element) nodeList.item(i);
			if (childEle == null || childEle.getParentNode() == element) {
				return childEle;
			}
		}
		return null;
	}
157986
private String extractAttribute(Element element, Arguments arguments,
            String attributeName) {
        final String toExpr = element.getAttributeValue(attributeName);
        if (toExpr == null) {
            return null;
        }
        final String to;
        if (toExpr.contains("#") || toExpr.contains("$")) {
            to = parse(arguments, toExpr);
        } else {
            to = toExpr;
        }
        element.removeAttribute(attributeName);
        return to;
    }