I am getting the SOAP xml response like this:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:MultiAvailabilityResponse xmlns:ns2="http://www.derbysoft.com/doorway" Status="Successful" Token="187be58c62c2f2515b5d78ee">
<ns2:Availabilities>
<ns2:Availability CurrencyCode="USD" HotelCode="HY-CHIRC">
<ns2:GuestCount AdultCount="1" ChildCount="0"/>
<ns2:RoomTypes>
<ns2:RoomType RoomTypeCode="JRSQ" RoomTypeName="JR SUITE 2 QUEEN BEDS">
<ns2:RoomTypeDescription>Rest in sublime comfort on one of two queen signature Hyatt Grand Beds®, fitted with fine linens, down blanket and plump pillows.</ns2:RoomTypeDescription>
</ns2:RoomType>
<ns2:RoomType RoomTypeCode="CLBD" RoomTypeName="REG CLUB 2 DOUBLE BEDS">
<ns2:RoomTypeDescription>one King or two double-sized Hyatt Grand Beds, fitted with luxurious linens, a down blanket and plush pillows</ns2:RoomTypeDescription>
</ns2:RoomType>
<ns2:RoomType RoomTypeCode="VW2Q" RoomTypeName="PREMIUM VW 2 QEN">
<ns2:RoomTypeDescription>Relax and unwind in our sophisticated downtown Chicago guestrooms with city, river and lake views</ns2:RoomTypeDescription>
</ns2:RoomType>
</ns2:RoomTypes>
<ns2:RoomRates>
<ns2:RoomRate RatePlanCode="49584IPRTF" RoomTypeCode="JRSQ">
<ns2:Rates>
<ns2:Rate AmountAfterTax="523.348" AmountBeforeTax="449.650" EffectiveDate="2016-04-28" ExpireDate="2016-04-29"/>
</ns2:Rates>
<ns2:Fees>
<ns2:Fee ChargeType="Tax" Percent="16.390" Type="Exclusive"/>
</ns2:Fees>
</ns2:RoomRate>
<ns2:RoomRate RatePlanCode="49584IPRTF" RoomTypeCode="CLBD">
<ns2:Rates>
<ns2:Rate AmountAfterTax="350.218" AmountBeforeTax="300.900" EffectiveDate="2016-04-28" ExpireDate="2016-04-29"/>
</ns2:Rates>
<ns2:Fees>
<ns2:Fee ChargeType="Tax" Percent="16.390" Type="Exclusive"/>
</ns2:Fees>
</ns2:RoomRate>
<ns2:RoomRate RatePlanCode="49584IPRTF" RoomTypeCode="VW2Q">
<ns2:Rates>
<ns2:Rate AmountAfterTax="305.699" AmountBeforeTax="262.650" EffectiveDate="2016-04-28" ExpireDate="2016-04-29"/>
</ns2:Rates>
<ns2:Fees>
<ns2:Fee ChargeType="Tax" Percent="16.390" Type="Exclusive"/>
</ns2:Fees>
</ns2:RoomRate>
</ns2:RoomRates>
</ns2:Availability>
</ns2:Availabilities>
</ns2:MultiAvailabilityResponse>
</SOAP-ENV:Body>
I am parsing it using xmltodict library. Now, I just want some elements from this response to use in my app. The elements, I want are: RatePlanCode, RoomTypeCode, RoomTypeName, AmountBeforeTax. Also, I want to sort the response based on AmountBeforeTax and get the result in the form of dictionary, my_dict = {'roomlist': [{'RoomTypeCode':value, 'RatePlanCode': vlaue, 'RoomTypeName': value, 'AmountBeforeTax': value }]}.
I didn't work with SOAP xml's and banging my head since morning. Any help would be appreciated. Thanks!