Re: [xml] node "reuse" from one doc in another

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).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]