|
I am a newbie and need help with the nesting of nodes. I have been able to create a document, create elements and append them. but when i want it to nest (ie, put some nodes as children of some node) it fails. i have done a selectSingleNode to find the node which will become parent of these children nodes... but when i try to append a child to this (curr_root), it fails at the nesting point....ie, when a node which becomes parent for subsequent nodes is made curr_root, there is a crash. why is this so?
i have got the curr_root as follows:
hr = IXMLDOMNode_selectSingleNode(XDNodeptr, xpathvar, &curr_root);
assert(SUCCEEDED(hr1));
and i do the following to append the child node ... (after creating it)
hr = IXMLDOMNode_appendChild(curr_root, tmpnode, NULL);
assert(SUCCEEDED(hr1));
please help.
|