code: def WriteHeader(self):
      
      xml_string = (
          '<?xml version="1.0" encoding="{0:s}"?>'
          '<kml xmlns="http://www.opengis.net/kml/2.2"><Document>'.format(
              self._output_mediator.encoding))
      self._output_writer.Write(xml_string)
docs: Writes the header to the output.