code: function(node,type) {
          var attributes = {};
          for(var attr = 0; attr < node.attributes.length; attr++) {
              if (type == "number") {
                  attributes[node.attributes[attr].nodeName] = parseFloat(node.attributes[attr].nodeValue);
              } else {
                  attributes[node.attributes[attr].nodeName] = node.attributes[attr].nodeValue;
              }
          }
          return attributes;
      }
docs: Method: parseAttributes
  
  Parameters:
  node - {<DOMElement>} An element to parse attributes from.
  
  Returns:
  {Object} An attributes object, with properties set to attribute values.