On Mon, Aug 01, 2005 at 09:54:01AM +0200, Remy HAREL wrote: > I have to read several documents, differents from each others, and I > want to re-use my xmlDocPtr. My main program calls many times a function > which reads, parses and works on my files. > > In this function, I wonder if I can re-initialize my xmlDocPtr without > xmlFreeDoc and xmlNewDoc for each function call.
not possible by default. The unit of allocation is the document. You can reuse parser contexts but not the document nodes. It's all a matter of having a good memory allocator underneath, which you can change if needed, see: http://xmlsoft.org/xmlmem.html#setting 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
