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 
namespace,
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 
on
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).

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]