Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: MSXML replaceChild syntax for replacing nodes? MSXML replaceChild syntax for replacing nodes?To: NULL Date: 7/11/2008 10:23:00 AM I have two xml files and I want to use VBA to replace a specific node in one of the xml files with a specific node in the other file. Both files have exactly the same structure. Only the root is different. The first node is: xmlDoc.ChildNodes(1).ChildNodes(1).ChildNodes(1) And the second node is: xmlDoc2.ChildNodes(1).ChildNodes(1).ChildNodes(1) What I want is to replace the second node in xmlDoc2 with the first one in xmlDoc. However, when I use the following code: xmlDoc2.replaceChild xmlDoc.ChildNodes(1).ChildNodes(1).ChildNodes(1), xmlDoc2.ChildNodes(1).ChildNodes(1).ChildNodes(1) I get the error message: "Insert position Node must be a Child of the Node to insert under." What's the correct syntax? | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
