I have an xml like this. There are items with old price and some dont have.
<product>
<item>
<name>product 1</name>
<price type="old">100</price>
<price type="new">50</price>
</item>
<item>
<name>product 2</name>
<price type="old">100</price>
<price type="new">50</price>
</item>
<item>
<name>product 3</name>
<price type="new">50</price>
</item>
</product>
I want to iterate through each item but only get those that have type="old" items.