Re: [xml] xmlDOMWrapCloneNode problem
- From: Noam Postavsky <npostavs users sourceforge net>
- To: George Georgiev <george georgiev sf gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] xmlDOMWrapCloneNode problem
- Date: Tue, 14 Aug 2012 15:18:46 -0400
George Georgiev <george georgiev sf gmail com> 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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]