Re: [xml] Can I allocate the memory for a xml-tree by myself?

On Fri, Jan 14, 2005 at 03:33:15PM +0100, Ronny Seemann wrote:
While using the parser module from libxml2 for parsing a XML document, it 
allocates the memory that is required itself. 
Is there a possibility in libxml2 to allocate this memory by myself. I would 
like to allocate my own memory, in order to give over that chunk to e.g. 
xmlParseFile(char *), where the xml-tree can be created.

  You can override libxml2 memory routines.
of course if you don't completely understand what it does, what
are the potential impacts of doing so, it will crash, put your
CPU on fire or even worse and you're absolutely on your own to
debug the thing. But you can do it. If you're not experienced with
libxml2 I suggest to avoid it as much as 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]