code: function(feature) {
          var geometryNode = this.buildGeometryNode(feature.geometry);
          var geomContainer = this.createElementNS(this.featureNS, "feature:" + this.geometryName);
          geomContainer.appendChild(geometryNode);
          var featureContainer = this.createElementNS(this.featureNS, "feature:" + this.featureName);
          featureContainer.appendChild(geomContainer);
          for(var attr in feature.attributes) {
              var attrText = this.createTextNode(feature.attributes[attr]); 
              var nodename = attr;
              if (attr.search(":") != -1) {
                  nodename = attr.split(":")[1];
              }    
              var attrContainer = this.createElementNS(this.featureNS, "feature:" + nodename);
              attrContainer.appendChild(attrText);
              featureContainer.appendChild(attrContainer);
          }    
          return featureContainer;
      }
docs: Method: createFeatureXML
  
  Parameters:
  feature - {<OpenLayers.Feature.Vector>}