Learn how to a build a cloud-first strategyRegister Now


Need to copy one XML Node to another node with a different node name

Posted on 2011-10-07
Medium Priority
Last Modified: 2012-05-12
I have an XML file similar to the one shown below.  What I need to do but don't know how is to make a copy of the node list1 with all of its attributes and subnodes and call it list2.  Is there an easy way to do this?

I'm using VB6.
       more node stuff here
       more node stuff here
    <list1 Default="(none)" ID="660" Customize="Y">
       <Choice value="(none)" Description="(none)" />
       <Choice value="Cirrus/Maestro" Description="Company MasterCard" />
       <Choice value="MasterCard" Description="Personal MasterCard" />

Open in new window

Question by:dyarosh
  • 2
  • 2
LVL 50

Expert Comment

by:Martin Liss
ID: 36932631
Take a look here.

Author Comment

ID: 36932921
I looked at that already and the problem is it makes a copy of the same node.  I need to make a copy of the node attributes and all of its child nodes but give it a different node name.
LVL 50

Accepted Solution

Martin Liss earned 2000 total points
ID: 36933105

Author Closing Comment

ID: 36934398

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month21 days, 2 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question