khalid taha

khalid taha

  • NA
  • 12
  • 13.2k

query to find minimum node value in xml

May 14 2013 3:01 AM
i have an xml in below format<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <GetFlightsResponse>
      <GetFlightsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Flight>
          <Airlines>AF</Airlines>
          <ArrivalCity>Frankfurt</ArrivalCity>
          <ArrivalTime>02:53 PM</ArrivalTime>
          <DepartureCity>Denver</DepartureCity>
          <DepartureTime>02:09 PM</DepartureTime>
          <FlightNumber>13628</FlightNumber>
          <Price>124.8</Price>
        </Flight>
        <Flight>
          <Airlines>LH</Airlines>
          <ArrivalCity>Frankfurt</ArrivalCity>
          <ArrivalTime>11:17 AM</ArrivalTime>
          <DepartureCity>Denver</DepartureCity>
          <DepartureTime>10:33 AM</DepartureTime>
          <FlightNumber>13634</FlightNumber>
          <Price>123.2</Price>
        </Flight>
        <Flight>
          <Airlines>BA</Airlines>
          <ArrivalCity>Frankfurt</ArrivalCity>
          <ArrivalTime>08:53 AM</ArrivalTime>
          <DepartureCity>Denver</DepartureCity>
          <DepartureTime>08:09 AM</DepartureTime>
          <FlightNumber>14021</FlightNumber>
          <Price>109.2</Price>
        </Flight>
      
      </GetFlightsResult>
    </GetFlightsResponse>
  </s:Body>
</s:Envelope>
 
i need to find the Flight number whose price is minimum .How to go about this

Answers (4)