[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] re-use xmldocPtr
- From: Daniel Veillard <veillard redhat com>
- To: Remy HAREL <rharel ext rd francetelecom com>
- Cc: xml gnome org
- Subject: Re: [xml] re-use xmldocPtr
- Date: Mon, 1 Aug 2005 04:21:05 -0400
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/
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]