Re: [xml] use of xmlReplaceNode



On Fri, Mar 05, 2004 at 01:26:09AM +0100, Ines Willenbrock wrote:
hi!

just like to ask, what the propper use of xmlReplaceNode is.

if I do somethink like

someNode = xmlReplaceNode(anyNode, newNode)

someNode points to anyNode, as expected, but the contents of anyNode are 
the same as before, and not, as I expected, the contents of anyNode.

  anyNode is replaced by newNode in the tree. anyNode is returned
(hence someNode is anyNode, once removed from its context) so that
the old content can be saved elsewhere in the document (or freed
with xmlFreeNode).

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]