code: function(node, uri, name) {
          var attributeNode = null;
          if(node.getAttributeNodeNS) {
              attributeNode = node.getAttributeNodeNS(uri, name);
          } else {
              var attributes = node.attributes;
              var potentialNode, fullName;
              for(var i=0, len=attributes.length; i<len; ++i) {
                  potentialNode = attributes[i];
                  if(potentialNode.namespaceURI == uri) {
                      fullName = (potentialNode.prefix) ?
                                 (potentialNode.prefix + ":" + name) : name;
                      if(fullName == potentialNode.nodeName) {
                          attributeNode = potentialNode;
                          break;
                      }
                  }
              }
          }
          return attributeNode;
      }
docs: APIMethod: getAttributeNodeNS
  Get an attribute node given the namespace URI and local name.
  
  Parameters:
  node - {Element} Node on which to search for attribute nodes.
  uri - {String} Namespace URI.
  name - {String} Local name of the attribute (without the prefix).
  
  Returns:
  {DOMElement} An attribute node or null if none found.