Re: [xml] Flushing writers doesn't work...?

On Wed, Feb 09, 2005 at 10:20:45AM +0100, Magnus Lie Hetland wrote:

I've been using xmlTextWriters as an abstraction in an internal
event-based system in my app -- but it seems they don't sync properly
when flushed. Maybe I'm expecting too much functionality from
xmlTextWriterFlush()? I've used both writers from

  it calls xmlOutputBufferFlush() if there have been some data added
to the writer, this should really work as expected.

xmlNewTextWriterFilename() and xmlNewTextWriterTree(), and neither
type is synced on calls to flush -- I have to destroy the writer with
xmlFreeTextWriter() to get the events into the file or tree,
respectively. That's not very practical... Especially when I'm
building trees incrementally -- then I have to keep track of the node
where I want to continue when instantiating a new writer, and so on...

Is there another way of doing this? Is this a bug/known problem?
Should I write my own writers/tree builders to get this functionality?

  a better explanation of what you're seeing and how it differs from
what you are expecting would help. I still don't see what the problem
might be. You need to be very precise and provide a reproduceable test
case if possible.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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