Have a very complex task for Powershell on remote work for me. It's hard to explain but I will try. I have XML file with complex structure (it's a file with settings for Visual Studio):
<UserSettings>
<ToolsOptions>
<ToolsOptionsCategory RegisteredName="Environment" name="Environment">
</ToolsOptionsCategory>
</ToolsOptions>
</UserSettings>
The task is add to section "ToolsOptionsCategory" following sub-node:
<ToolsOptionsSubCategory PackageName="VS Setup Composition" RegisteredName="ProductUpdates" name="ProductUpdates">
<PropertyValue name="IsBackground">true</PropertyValue>
</ToolsOptionsSubCategory>
I tried to AppendChild and CreateElement, but I don't have an idea how to add such attributes as "PackageName" and "RegistereName". This subnode is absent from the target file and I need to add it. I would be great if you can help me and show me the way.
Thank you in advance! Be health and stay at home :)