code: function(node){
          var attributes = {};
          if (node.nodeType == 1) {
              var children = node.childNodes;
              var n = children.length;
              for (var i = 0; i < n; ++i) {
                  var child = children[i];
                  if (child.nodeType == 1) {
                      var grandchildren = child.childNodes;
                      var name = (child.prefix) ?
                          child.nodeName.split(":")[1] : child.nodeName;
                      if (grandchildren.length == 0) {
                          attributes[name] = null;
                      } else if (grandchildren.length == 1) {
                          var grandchild = grandchildren[0];
                          if (grandchild.nodeType == 3 ||
                              grandchild.nodeType == 4) {
                              var value = grandchild.nodeValue.replace(
                                  this.regExes.trimSpace, "");
                              attributes[name] = value;
                          }
                      }
                  }
              }
          }
          return attributes;
      }
docs: Method: parseAttributes
  
  Parameters:
  node - {<DOMElement>}
  
  Returns:
  {Object} An attributes object.
  
  Notes:
  Assumes that attributes are direct child xml nodes of the passed node
  and contain only a single text node.