I have some XML that looks something like the one below
<DriveLayout>
<Drive totalSpace="16" VolumeGroup="dg01" />
<Drive totalSpace="32" VolumeGroup="dg01" />
<Drive totalSpace="64" VolumeGroup="dg02" />
<Drive totalSpace="64" VolumeGroup="dg02" />
<VolumeGroups>
<VolumeGroup VolumeGroup="dg01" storageTier="1" />
<VolumeGroup VolumeGroup="dg02" storageTier="2" />
</VolumeGroups>
</DriveLayout>
I need a way to go back through the XML and add the attribute storageTier to each individual Drive node. Is there a way to loop through each drive node and grab the VolumeGroup then get the cooresponding storageTier out of the XML in the VolumeGroup node? I then need to inject the correct storageTier back into the XML drive node. I'm using the System.XML that's in C#.
Thanks
Any help would be greatly appreciated