code: function(node) {
          var attributes = {};
         
          // Extended Data is parsed first.
          var edNodes = node.getElementsByTagName("ExtendedData");
          if (edNodes.length) {
              attributes = this.parseExtendedData(edNodes[0]);
          }
          
          // assume attribute nodes are type 1 children with a type 3 or 4 child
          var child, grandchildren, grandchild;
          var children = node.childNodes;
  
          for(var i=0, len=children.length; i<len; ++i) {
              child = children[i];
              if(child.nodeType == 1) {
                  grandchildren = child.childNodes;
                  if(grandchildren.length >= 1 && grandchildren.length <= 3) {
                      var grandchild;
                      switch (grandchildren.length) {
                          case 1:
                              grandchild = grandchildren[0];
                              break;
                          case 2:
                              var c1 = grandchildren[0];
                              var c2 = grandchildren[1];
                              grandchild = (c1.nodeType == 3 || c1.nodeType == 4) ?
                                  c1 : c2;
                              break;
                          case 3:
                          default:
                              grandchild = grandchildren[1];
                              break;
                      }
                      if(grandchild.nodeType == 3 || grandchild.nodeType == 4) {
                          var name = (child.prefix) ?
                                  child.nodeName.split(":")[1] :
                                  child.nodeName;
                          var value = OpenLayers.Util.getXmlNodeValue(grandchild);
                          if (value) {
                              value = value.replace(this.regExes.trimSpace, "");
                              attributes[name] = value;
                          }
                      }
                  } 
              }
          }
          return attributes;
      }
docs: Method: parseAttributes
  
  Parameters:
  node - {DOMElement}
  
  Returns:
  {Object} An attributes object.