code: function(feature) {        
          // Placemark name
          var placemarkName = this.createElementNS(this.kmlns, "name");
          var label = (feature.style && feature.style.label) ? feature.style.label : feature.id;
          var name = feature.attributes.name || label;
          placemarkName.appendChild(this.createTextNode(name));
  
          // Placemark description
          var placemarkDesc = this.createElementNS(this.kmlns, "description");
          var desc = feature.attributes.description || this.placemarksDesc;
          placemarkDesc.appendChild(this.createTextNode(desc));
          
          // Placemark
          var placemarkNode = this.createElementNS(this.kmlns, "Placemark");
          if(feature.fid != null) {
              placemarkNode.setAttribute("id", feature.fid);
          }
          placemarkNode.appendChild(placemarkName);
          placemarkNode.appendChild(placemarkDesc);
  
          // Geometry node (Point, LineString, etc. nodes)
          var geometryNode = this.buildGeometryNode(feature.geometry);
          placemarkNode.appendChild(geometryNode);        
          
          // output attributes as extendedData
          if (feature.attributes) {
              var edNode = this.buildExtendedData(feature.attributes);
              if (edNode) {
                  placemarkNode.appendChild(edNode);
              }
          }
          
          return placemarkNode;
      }
docs: Method: createPlacemarkXML
  Creates and returns a KML placemark node representing the given feature.
  
  Parameters:
  feature - {<OpenLayers.Feature.Vector>}
  
  Returns:
  {DOMElement}