Re: [xml] =?koi8-r?b?eG1sRW5jb2RlU3BlY2lhbENoYXJzIGFuZCBjYXJyaWFnZSBy?= =?koi8-r?b?ZXVybiAvIENSTEYgLyAweDBEIDB4MEEgLyBcclxuIC8gMTMsMTA=?=

I'm add functions for Flush and Close context and now xml full out in file. But file corrupted between 
characters of name attributes places 0x0, tags not closed, eat strings.

                xmlSaveCtxt *ctx = xmlSaveToFilename(xmlFileName.c_str(), (const xmlChar*)"utf-8", 1);
                if (ctx != NULL)
                        if ( xmlSaveSetEscape(ctx, escape) != -1 )
                        xmlSaveSetAttrEscape(ctx, escape);
                                if (xmlSaveDoc(ctx, XMLDoc) != -1)
                                Application->MessageBox(AnsiString("All saved").c_str(),NULL,MB_OK);

Escape function just void, i don't want encode data for test:

int escape(unsigned char * out, int * outlen, const unsigned char * in, int * inlen)
return *outlen;

Hum, I had forgotten about xmlSaveSetEscape(). Yes this should
work assuming you provide a function which does the proper changes.
Since I don't know what 'escape' is in your code there is no way I can
even try to diagnose why.
  I suggest you use a debugger, and put a breakpoint in that function
first to see if it's called, and if yes hat's happening.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]