I have an XML input as shown below. I want to print output of each customer information for fields Cust_1, Gender & Price. I only want to print the price of chairs with Red color. I tried using choose-when and if but not getting the desired output. Any help is greatly appreciated.
<Sales_Data>
<Furniture>
<Customer_Reference>Cust_1</Customer_Reference>
<Gender>M</Gender>
<Chairs>
<Color_Ref>Black</Color_Ref>
<Price>
<Unit_Price>1000</Unit_Price>
</Price>
</Chairs>
<Chairs>
<Color_Ref>Red</Color_Ref>
<Price>
<Unit_Price>1100</Unit_Price>
</Price>
</Chairs>
</Furniture>
<Furniture>
<Customer_Reference>Cust_2</Customer_Reference>
<Gender>F</Gender>
<Chairs>
<Color_Ref>Blue</Color_Ref>
<Price>
<Unit_Price>950</Unit_Price>
</Price>
</Chairs>
<Chairs>
<Color_Ref>Red</Color_Ref>
<Price>
<Unit_Price>1050</Unit_Price>
</Price>
</Chairs>
</Furniture>
</Sales_Data>