[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] xmlwriter, flush file buffer
- From: Daniel Veillard <veillard redhat com>
- To: Pierre Joye <pierre dev gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] xmlwriter, flush file buffer
- Date: Thu, 3 Mar 2005 05:46:32 -0500
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/xml gnome org/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/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]