Programmer's Guide > Interfaces > ADocument interface > getElementsByAttributeNS method
  
getElementsByAttributeNS method
Returns a NodeList of all descendant Elements that match the given attribute namespace URI, local name, and attribute value, in the order in which they are encountered in a pre-order traversal of this Document tree.
getElementsByAttributeNS(namespaceURI, localName, value selector)
Parameters
StringnamespaceURI
The namespace URI of the attribute to retrieve. The value "*" matches all namespaces.
StringlocalName
Specifies the local name of the attribute to match. The value "*" matches all local attribute names.
Stringvalue
Specifies the value of the attribute to match.
ATIElementAttributeSelectorselector
Specifies how the attribute value should be matched. When selector is 0, the value parameter is ignored. When selector is 1, only the elements that match both the name and the value are included.
Returns
NodeList. A list of matching element nodes.
Throws
DOMException
SYNTAX_ERR: If selector is invalid.
INVALID_CHARACTER_ERR: If localname is namespace qualified.