code: function(obj, options) {
          var version = this.getVersion(null, options);
          this.parser = this.getParser(version);
          var root = this.parser.write(obj, options);
          if (this.stringifyOutput === false) {
              return root;
          } else {
              return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
          }
      }
docs: APIMethod: write
  Write a document.
  
  Parameters:
  obj - {Object} An object representing the document.
  options - {Object} Optional configuration object.
  
  Returns:
  {String} The document as a string