Пример #1
0
int QtXmlWrapper::saveXMLfile(const std::string &filename) const
{
    char *xmldata = getXMLdata();
    if(xmldata == NULL)
        return -2;

    int compression = config.cfg.GzipCompression;
    int result      = dosavefile(filename.c_str(), compression, xmldata);

    delete[] xmldata;
    return result;
}
Пример #2
0
int XMLwrapper::saveXMLfile(const char *filename){
    char *xmldata=getXMLdata();
    if (xmldata==NULL) return(-2);

    int compression=3;
    
    int fnsize=strlen(filename)+100;
    char *filenamenew=new char [fnsize];
    snprintf(filenamenew,fnsize,"%s",filename);
    
    int result=dosavefile(filenamenew,compression,xmldata);
    
    delete []filenamenew;
    delete []xmldata;    
    return(result);
};