code: function(node) {
          // node is either a wpt, trk or rte
          // attributes are children of the form <attr>value</attr>
          var attributes = {};
          var attrNode = node.firstChild, value, name;
          while(attrNode) {
              if(attrNode.nodeType == 1 && attrNode.firstChild) {
                  value = attrNode.firstChild;
                  if(value.nodeType == 3 || value.nodeType == 4) {
                      name = (attrNode.prefix) ?
                          attrNode.nodeName.split(":")[1] :
                          attrNode.nodeName;
                      if(name != "trkseg" && name != "rtept") {
                          attributes[name] = value.nodeValue;
                      }
                  }
              }
              attrNode = attrNode.nextSibling;
          }
          return attributes;
      }
docs: Method: parseAttributes
  
  Parameters:
  node - {<DOMElement>}
  
  Returns:
  {Object} An attributes object.