Clarification of approach required for reading XML data in PowerShell.
First typeset the XML file:
[xml]$mydatalist = (get-content c:\mydatalist.xml)
That piece I’m OK with!!!
The content of this file is noted below and for each entry that has 0 in I want to export the data for and and total each of them i.e. a total of SomeData1, a total of SomeData2 and a total of SomeData3 – all where SomeData4=0.
With that command you would get 3 objects, one for each property name. Each object would have a Sum property. If you wanted a single object, you could do something like this to convert it: