On 03/03/2017 11:56, Liebhart Heinz wrote:
   /* now add extracted node from input to new doc */
   xmlAddChild(root_node, root_node_in); /* <<--- causes the problem */

Unlike some of the other xmlAdd* functions, xmlAddChild doesn't unlink the added node, so you have to call xmlUnlinkNode first (or copy the node with xmlDocCopyNode if you want to keep it in the source document).

Nick

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to