public abstract boolean hasAttributeNS (String namespaceURI, String localName) throws DOMException

Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters:
namespaceURI    The namespace URI of the attribute to look for.
localName    The local name of the attribute to look for.

Returns:  true if an attribute with the given local name and namespace URI is specified or has a default value on this element, false otherwise.

Exceptions:
DOMException     NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).

Since:  DOM Level 2