How to iterate the irregularly-named children of an Xml.XmlElement in Powershell?
问题 I have an XML file of the following format: <xml> <data> <foo float="99.0"/> <bar float="12.0"/> <tribble bool="true"/> ... <flibble int="1"/> </data> </xml> If I fetch that data in Powershell, I can see all the child elements of data with a Get-Memeber: > $xmlData = [xml](Get-Content myfile.xml) > $xmlData.data | Get-Member ... foo Property System.Xml.XmlElement ... bar Property System.Xml.XmlElement ... tribble Property System.Xml.XmlElement ... ... And I can access each child element