EDN Admin
Well-known member
Herewith:<br/>
<br/>
MSXML2::IXMLDOMElementPtr ElementRoot = pXMLDoc->GetdocumentElement();<br/>
MSXML2::IXMLDOMNodePtr NodeFirstChild = ElementRoot ->firstChild;<br/>
<br/>
MSXML2::IXMLDOMNodePtr ClonedChild = NodeFirstChild->cloneNode(true);<br/>
ElementRoot->appendChild( ClonedChild );<br/>
<br/>
I tried to clone the first child in the root element of an XML document. <br/>
<br/>
Even I pass true to the methode cloneNode, not the entire child is cloned.<br/>
Only the child it self is cloned and added to the root element. Its sub nodes<br/>
are not cloned and added. <br/>
<br/>
<br/>
How can I fix that?<br/>
View the full article
<br/>
MSXML2::IXMLDOMElementPtr ElementRoot = pXMLDoc->GetdocumentElement();<br/>
MSXML2::IXMLDOMNodePtr NodeFirstChild = ElementRoot ->firstChild;<br/>
<br/>
MSXML2::IXMLDOMNodePtr ClonedChild = NodeFirstChild->cloneNode(true);<br/>
ElementRoot->appendChild( ClonedChild );<br/>
<br/>
I tried to clone the first child in the root element of an XML document. <br/>
<br/>
Even I pass true to the methode cloneNode, not the entire child is cloned.<br/>
Only the child it self is cloned and added to the root element. Its sub nodes<br/>
are not cloned and added. <br/>
<br/>
<br/>
How can I fix that?<br/>
View the full article