Re: [xml] namespace structure and void * _private field

On Mon, Apr 02, 2007 at 04:06:53PM -0500, David Hagood wrote:
Is the "void *    _private" member of the _xmlNs intended for the use of
libXML2, or for the use of the program *using* libXML2.

In other words: If I wish to associate my own object with a given 
can I use the "_private" member of the namespace object, or do I need to do
some other mechanism to map from a namespace into my object (e.g. hashing 
the URL of the namespace)?

  You should be able to use it, yes, that's the purpose, but there is no hook
to free any associated data when namespaces nodes are freed, so the memory
management of your data need to be done independantly, probably at a document
level (or larger).


Red Hat Virtualization group
Daniel Veillard      | virtualization library
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]