getAttributeNodeNS
Returns the attribute with the given namespace and name as a separate node.
Syntax
attributeNode = element.getAttributeNode(namespace, nodeName)Parameters
namespace is a string containing the namespace of the attribute.
nodeName is a string containing the name of the node.
attributeNode is a separate Attribute node.
Example
// html: <div id="top" /> t = document.getElementById("top"); specialNode = t.getAttributeNodeNS( "http://www.mozilla.org/ns/specialspace", "id"); // iNode.value = "full-top"
Notes
The Attribute node inherits from node, but is not considered a part of the document tree. Common node attributes like parentNode, previousSibling, and nextSibling are NULL for an Attribute node.
You can, however, get the element to which the attribute belongs with the ownerElement property.
getAttributeNodeNS is more specific than getAttributeNode in that it allows you to specify attributes that are part of a particular namespace. The corresponding setter method is setAttributeNodeNS.
Specification
getAttributeNodeNS
Netscape Communications http://developer.netscape.com |