code: function(options) {
          // compile regular expressions once instead of every time they are used
          this.regExes = {
              trimSpace: (/^\s*|\s*$/g),
              removeSpace: (/\s*/g),
              splitSpace: (/\s+/),
              trimComma: (/\s*,\s*/g),
              kmlColor: (/(\w{2})(\w{2})(\w{2})(\w{2})/),
              kmlIconPalette: (/root:\/\/icons\/palette-(\d+)(\.\w+)/),
              straightBracket: (/\$\[(.*?)\]/g)
          };
          // KML coordinates are always in longlat WGS84
          this.externalProjection = new OpenLayers.Projection("EPSG:4326");
  
          OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
      }
docs: Constructor: OpenLayers.Format.KML
  Create a new parser for KML.
  
  Parameters:
  options - {Object} An optional object whose properties will be set on
  this instance.