Re: [xml] Getting element content non-recursively



On Wed, Sep 20, 2006 at 09:20:50AM +0100, Caroline Middlebrook wrote:

copy and paste ! Yes you need 2 operations to be sure if you don't
understand libxml2 internals:
 http://xmlsoft.org/html/libxml-tree.html#xmlDocCopyNode
 http://xmlsoft.org/html/libxml-tree.html#xmlAddNextSibling

Daniel

Aha! Thanks very much, problem solved! However, those functions above led me
to xmlReplaceNode which did exactly what I wanted. :-)

  Try to not move nodes from one document to another, you may hit pointer
problems related to dictionnaries, that's why it's better to make a copy
first for the target document.

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]