How can I get a list of multiple XML files from a specified directory and for each file add an element under the second root node using powershell?
Example:
I want to add <LastName>SomeName</LastName>
within the FIRST <Names>
element:
<People>
<Names>
<FirstName>someFirstName</FirstName>
</Names>
<Names>
<FirstName>myFirstName</FirstName>
<Address>SomeAddress</Address>
</Names>
</People>
Will become:
<People>
<Names>
<LastName>SomeName</LastName>
<FirstName>someFirstName</FirstName>
</Names>
<Names>
<FirstName>myFirstName</FirstName>
<Address>SomeAddress</Address>
</Names>
</People>