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)
                                {
                                xmlSaveFlush(ctx);
                                xmlSaveClose(ctx);
                                Application->MessageBox(AnsiString("All 
saved").c_str(),NULL,MB_OK);
                                xmlFreeDoc(XMLDoc);
                                xmlCleanupParser();
                                xmlMemoryDump();
                                }
                        }
                }

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.
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to