Re: [xml] Do xmlBuffers grow dynamically as needed?



On Mon, Aug 19, 2002 at 11:33:41AM +0200, Holger Rauch wrote:
Hi!

I'm new to libxml2 and trying to extract a document fragment using
xmlNodeDump(). This function requires an xmlBufferPtr as one of its
arguments. Will calling xmlNodeDump() automatically grow a previously
xmlBufferCreate()ed xmlBuffer? If not, what are the alternatives?

  yes xmlBuffer(s) grow automatically as needed.
Alternative is to use an xmlOutputBufferPtr created with the callbacks needed
for your output and call xmlNodeDumpOutput() instead, this is useful
if you don't want the full document serialized in memory and stream
it out progressively.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]