I have an xml file in a format similar to this:
<benchmark>
<group>
<id>1</id>
<rule>
<id>H1234</id>
<severity>High</severity>
</rule>
<title>How to win</title>
</group>
<group>
<id>2</id>
<rule>
<id>5317</id>
<severity>low</severity>
</rule>
<title>How to not</title>
</group>
<group>
<id>3</id>
<rule>
<id>H15678</id>
<severity>medium</severity>
</rule>
<title>How to be</title>
</group>
<group>
<id>4</id>
<rule>
<id>H454</id>
<severity>High</severity>
</rule>
<title>How to lose</title>
</group></benchmark>
I would like to be able to select the group/id, group/rule/id, group/rule/severity and group/title values from each group in the xml docoument.
I have tried this but it only gets me part of the way there:
I have tried $xml.benchmark.group | %{$_} | select title, id
I appreciate your help!