George Georgiev <[email protected]> writes: > int main(int argc, char **argv) > { ... > xmlNodePtr mathPr = xmlNewDocNode(doc2, mns, BAD_CAST"mathPr", NULL); ... > xmlDOMWrapCloneNode(NULL, // xmlDOMWrapCtxtPtr - > optional > mathFont->doc, // sourceDoc (must not be > NULL) > mathFont, // node to clone > &newChildNode, // destNode > mathPr->doc, // destDoc > mathPr, // destParent > TRUE, // deep = clone children > 0 // options (ATTRIBUTE_UNUSED) > ); > ... > xmlAddChild(root, mathPr); ... > }
The trouble seems to be using an unlinked node as destParent: if I do xmlAddChild() before xmlDOMWrapCloneNode(), there are no problems. It might be sensible for xmlDOMWrapCloneNode() to signal an error for this case. _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] https://mail.gnome.org/mailman/listinfo/xml
