def saveFormatFileEnc(self, filename, encoding, format):
        """Dump an XML document to a file or an URL. """
        ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
        return ret