Re: [xml] xmlOutputBufferCreateFile VS2015 I/O error : Bad file descriptor



On 16.04.2016 11:23, Sylvain Pointeau wrote:

FILE*f = fopen("C:\\myfolder\testdata.xml", "w");

xmlOutputBufferPtroutput = xmlOutputBufferCreateFile(f, NULL);

xmlOutputBufferWriteString(output, "WHY DO YOU CRASH?");

xmlOutputBufferClose(output); <- at this moment it displays I/O error :
Bad file descriptor

fclose(f);



Not sure if it's important, but I see that internally libxml2 opens with
"wb" mode in some cases.


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