Code example for Element

Methods: getAttributeNodeNS

		String localPart = attributeName.getLocalPart();
		if (localPart == null)
			throw new IllegalArgumentException(
					"Local part of the attribute name can not be NULL"); 
		Attr a = el.getAttributeNodeNS(nsURI,
		if (a == null)
			// try to get with null namespace 
			a = el.getAttributeNodeNS(null, localPart);
		return a;
	 * The method compares node's name to the given qname. 
	 * @param n a node. 
	 * @param name a QName object. 
	 * @return true if the node's name is the same as the given qname. 
Contextual code suggestions in your IDE  Get Codota for Java