Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Powershell xml insert parent tag around all siblings?

$
0
0

<root>

    <parent>

        <child1>

            ...

        </child1>

        <child2>

            ...

         </child2>

    </parent>

</root>

 

i would like like to add a newParent tag like so:

 

<root>

    <parent>

       <newParent>

         <child1>

            ...

        </child1>

        <child2>

            ...

         </child2>

       </newParent>

    </parent>

</root>

 

How do I do this?


Viewing all articles
Browse latest Browse all 8583