Re: [xml] PATCH: implement xmlSaveToBuffer()



Hi Daniel,

  You should rather use the I/O interface when writing to a file !
Use xmlSaveToIO instead. Define your function for write and close and
use this, this will avoid growing a huge buffer to later dump it to a file.

Yes, this is something I wanted to do but I had some problems with getting it to work with Pyrex segfaulting on me. Ah well, I think I need to start understanding Pyrex ...

Can we just change the xmlSaveToBuffer() prototype to accept an xmlOutputBuffer as per the updated patch attached? Or is there something which makes it better to have an interface with an xmlBuffer?

  The xmlBuffer should be used when you don't dump to an I/O channel.
Then the user just want a memory string and an xmlBuffer makes way more sense
than an xmlOutputBuffer in that case.
Ok, understood. I will take your original suggestion and try to submit a new patch.

Thanks,
Geert



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