I have two XML objects floating around and I want to take data from the first one and put it in the second one. I am getting an error when I try to append the child from the first document to the second one.
The error I am getting is on the AppendChild line, and I am getting:
ERROR#: -2147024809, description: 'The parameter is incorrect.'
VB Code:
'objXML is a valid XML DOMDocument with a few child nodes in it. Dim objNewXML As DOMDocument Dim objNewNode as IXMLDomNode Dim objNode as IXMLDomNode Set objNewNode = objNewXML.createElement("Toolbar") For Each objNode In objXML.childNodes(0).childNodes objNewNode.appendChild objNode.cloneNode(True) Next objNewXML.appendChild objNewNode MsgBox objNewXML.xml
I remember something that you can't directly copy the nodes from one doc to another, but I thought using clone would get around that. Any assistance would be appreciated.
Thanks,


Reply With Quote