Dump an XML document to an I/O buffer. Warning ! This call
          xmlOutputBufferClose() on buf which is not available after
           this call.

def saveFormatFileTo(self, cur, encoding, format):
        """Dump an XML document to an I/O buffer. Warning ! This call
          xmlOutputBufferClose() on buf which is not available after
           this call. """
        if cur is None: cur__o = None
        else: cur__o = cur._o
        ret = libxml2mod.xmlSaveFormatFileTo(self._o, cur__o, encoding, format)
        return ret