On Thu, Mar 03, 2005 at 11:00:27AM +0100, Pierre Joye wrote: > Hello, > > I'm a bit confused with xmlTextWriterFlush (simple wrapper around > xmlOutputBufferFlush). > > I expected it to flush the IO and not only to flush the buffer to the > IO. After a short review, it seems that xmlFileFlush should be called > as well. Actually the buffer is just pushed out, and no system flush > is done. xmlFileFlush being called only using the closecallback > (default callback). > > Is it the expected behiavior? > > The problem is basically the same as described here: > http://www.mail-archive.com/[email protected]/msg00140.html > > My problem is that I have to mess up directly with the IO when using > the libxml IO implementation.
You can't call directly xmlFileFlush() from xmlOutputBufferFlush() you must use one of the I/O callbacks. And it does call out->writecallback() there is no "flush" notion at that level of the I/O stack. xmlOutputBufferFlush() means the data in the buffers are written to the I/O, if you want a synchronous write then you should use an I/O open in that mode. Checking for out->closecallback == xmlFileFlush and calling it in that case might be doable, but a close is not a flush semantically. Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
