Re: [xml] Thread safety question



On Sat, Jan 05, 2002 at 08:42:19AM -0800, Brent R. Matzelle wrote:
One other question.  My program contains a DOM that creates new nodes
pretty often which, given time, would make the DOM quite large.  I
looked over the documentation for a xmlRemoveNode function but could
only find an xmlRemoveProp.  Is there any efficient method to delete
nodes from the DOM tree and free the allocated memory without
re-creating the DOM without the unwanted node?

  Hum, in 2 operations yes:
    xmlUnlinkNode(xmlNodePtr) will extract the node/subtree from the tree
    xmlFreeNode(xmlNodePtr) will then free the node/subtree

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]