I am trying to loop through XML Linked Nodes Powershell, but I cannot seem to seperate them.
<?xml version="1.0" encoding="utf-8"?>
<Test>
<Settings>
<SomeSetting>
<AAA>Some Value</AAA>
<BBB>Some Value</BBB>
</SomeSetting>
<AnotherSetting>
<CCC>Some Value</CCC>
<DDD>Some Value</DDD>
</AnotherSetting>
</Settings>
</Test>
Now $XML.Test.Settings
contains
SomeSetting AnotherSetting
SomeSetting AnotherSetting
I cannot loop through these elements individually. I want to loop through them where I get an array where the first item is SomeSetting and the second is AnotherSetting
I've tried leveraging GetEnumerator() and Looping through ($XML.Test.Settings).ChildNodes, but I keep ending up with a System.Xml.XmlLinkedNode object containing everything in one chunk.