I have an XML file that is structured like this:
<XMLFile>
<Thing Stuff1='data' Stuff2='data' Stuff3='data' .....Stuff100='data'</Thing>
<Thing Stuff1='data' Stuff2='data' Stuff3='data' .....Stuff85='data'</Thing>
<Thing Stuff1='data' Stuff2='data' Stuff3='data' .....Stuff91='data'</Thing>
.
.
.
</XMLFile>
The attributes in each Thing are not always the same, some may be present and some may not. I read the file into $xmldata like this:
[xml]$xmldata = Get-Content -Path xmlfilename
I access each 'Thing' in $xmldata like this:
$xmldata.XMLFile.Thing
I want to enumerate all the Stuff attributes using something like
$xmldata.XMLFile.Thing.ForEach({$_.??????})
What do I use in place of the question marks to get a list of all the 'Stuff' items in each 'Thing'?