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

def saveFileTo(self, cur, encoding):
        """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.xmlSaveFileTo(self._o, cur__o, encoding)
        return ret