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

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.
<root>
  <data>
    <table1>
       more node stuff here
    </table1>
    <table2>
       more node stuff here
    </table2>
  </data>
  <ChoiceLists>
    <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" />
    </list1>
  </ChoiceLists>
</root>

Open in new window

dyaroshAsked:
Who is Participating?
 
Martin LissOlder than dirtCommented:
0
 
Martin LissOlder than dirtCommented:
Take a look here.
0
 
dyaroshAuthor Commented:
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.
0
 
dyaroshAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.