Hello again,

I did it with parsing a doc in memory like

        const char * xml = "<mycontent><mytext>hello</mytext></mycontent>";

        xmlDocPtr doc_fragment = xmlReadMemory(xml,
strlen(xml),"noname.xml",NULL,0);

        xmlNodePtr root_node =  xmlDocGetRootElement(doc_fragment);

        xmlNodePtr new_node = xmlDocCopyNode (root_node, doc, 1);

        xmlFreeDoc(doc_fragment);

         xmlAddChild(mynodewhereIwanttoinsertthisfragment,new_node);


and it works!


is it the best solution? (only one?)


Best regards,

Sylvain
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to