rrewkn1976
New Member
Guys I have to change the amount attribute in xml file in c#.I am Getting response from webservice and I need to alter its contents i.e amount attritbute in the following node:\[code\]<TotalFare Amount="4848" CurrencyCode="INR"/>\[/code\]I have to modify amount attribute in foreach loop in c# code file.My xml is like this:\[code\]<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <OTA_AirLowFareSearchRS Version="2.001" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:ns1="http://www.opentravel.org/OTA/2003/05"> <Success/> <PricedItineraries> <PricedItinerary FareQuotePricedItinerary="false" FareType="Refundable" MatrixFare="true" OriginDestinationRPH="DELBOMSG109SG20130420" ReturnOnly="false" SeatToSell="40" SequenceNumber="1.0" SupplierSystem="SGNAV"> <AirItinerary SupplierSystem="SGNAV"> <OriginDestinationOptions> <OriginDestinationOption Duration="02:05:00" FareBasisCode="F" FlightID="DELBOMSG109SG" ReturnOnly="false" SupplierCode="SGAPI" SupplierSystem="SGNAV" UniqueIdentifier="1.0"> <FlightSegment ArrivalDateTime="2013-04-20T12:15:00" DateWindow="" DepartureDateTime="2013-04-20T10:10:00" Duration="02:05:00" FlightNumber="109" LTD="SGAPI" NumberInParty="DELBOM" ResBookDesigCode="F" Status="40" StopQuantity="0" ValidConnectionInd="SGAPI"> <BookingClassAvail FareType="J" ResBookDesigCode="F"/> <DepartureAirport AirPortName="Indira Gandhi" CityName="New Delhi" CodeContext="IATA" LocationCode="DEL"/> <ArrivalAirport AirPortName="Chatrapati Shivaji" CityName="Mumbai" CodeContext="IATA" LocationCode="BOM"/> <Equipment AirEquipType="737"/> <MarketingAirline Code="SG" CodeContext="IATA" MatrixCode="SG" Name="Spice Jet" YTAirlineCode="SG"/> </FlightSegment> <FormData> <item> <SelectedFareCode>F</SelectedFareCode> <Fares> <item> <BaseAmount> <Amount>920.0</Amount> <CurrencyCode>INR</CurrencyCode> </BaseAmount> <PassengerTypeCode>ADT</PassengerTypeCode> <Meal/> <FareGroup>R</FareGroup> <ToSell>40</ToSell> <Cabin>1</Cabin> <FareCode>F</FareCode> </item> </Fares> <Flights> <item> <ArrivalDateTime>2013-04-20T12:15:00.000Z</ArrivalDateTime> <OpSuffix/> <NumberOfStops>0</NumberOfStops> <DepartureDateTime>2013-04-20T10:10:00.000Z</DepartureDateTime> <AircraftType>737</AircraftType> <DepartureTerminal/> <Overnight>false</Overnight> <Status/> <Origin>DEL</Origin> <ArrivalTerminal/> <ServiceType>J</ServiceType> <ArrivalTimeOffset>+0530</ArrivalTimeOffset> <Destination>BOM</Destination> <FlightLegs> <item> <IrregularOperationIndicator/> <Remarks></Remarks> <FlightDesignator>SG 109</FlightDesignator> <ScheduledDepartureTime>2013-04-20T10:10:00.000Z</ScheduledDepartureTime> <ScheduledArrivalTime>2013-04-20T12:15:00.000Z</ScheduledArrivalTime> <Lid>189</Lid> <DepartureDate>2013-04-20T10:10:00.000Z</DepartureDate> <Sold>0</Sold> <DepartureAirport>DEL</DepartureAirport> <OpSuffix/> <FlightDetail/> <AircraftType>737</AircraftType> <DepartureTerminal>1D</DepartureTerminal> <Overnight>false</Overnight> <Status>false</Status> <ArrivalTerminal>1D</ArrivalTerminal> <AircraftCode>737-800</AircraftCode> <ServiceType>J</ServiceType> <ArrivalTimeOffset>+0530</ArrivalTimeOffset> <JointOpDesig/> <Capacity>189</Capacity> <DepartureTimeOffset>+0530</DepartureTimeOffset> <ArrivalAirport>BOM</ArrivalAirport> </item> </FlightLegs> <DepartureTimeOffset>+0530</DepartureTimeOffset> <FlightNumber>109</FlightNumber> <CarrierCode>SG</CarrierCode> </item> </Flights> </item> <FareDifference> <TotalFare ADT="1" BaseFare="920-ADT 920.0" CHD="0" Cabin="Economy" HostName="railserver" INF="0" Rbd="J - F - 40" Tax="PSF-0YQ-2850UDF-0YR-187WC-0TF-0OC-891">4848</TotalFare> </FareDifference> <TicketingInfo DeliveryMethod="EMAIL" TicketTimeLimit="" TicketType="eTicket" TicketingStatus="" eTicketNumber=""> <TicketAdvisory Language="English"/> </TicketingInfo> <AgentMarkup> <Airlines> <Airline> <Code>6E</Code> <GDS>0</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>2700.0000</Surcharge> </Airline> <Airline> <Code>9H</Code> <GDS>0</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>M</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>6.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>0.0000</Surcharge> </Airline> <Airline> <Code>9W</Code> <GDS>1</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>1100.0000</Surcharge> </Airline> <Airline> <Code>AI</Code> <GDS>1</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>1100.0000</Surcharge> </Airline> <Airline> <Code>DN</Code> <GDS>0</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>M</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>6.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>3250.0000</Surcharge> </Airline> <Airline> <Code>G8</Code> <GDS>0</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>2700.0000</Surcharge> </Airline> <Airline> <Code>I7</Code> <GDS>0</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>M</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>6.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>0.0000</Surcharge> </Airline> <Airline> <Code>IC</Code> <GDS>1</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>1100.0000</Surcharge> </Airline> <Airline> <Code>IT</Code> <GDS>1</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>1100.0000</Surcharge> </Airline> <Airline> <Code>S2</Code> <GDS>1</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>1100.0000</Surcharge> </Airline> <Airline> <Code>SG</Code> <GDS>0</GDS> <WholeSalerFees>0.0000</WholeSalerFees> <WholeSalerFeesType>F</WholeSalerFeesType> <CommissionType>C</CommissionType> <ApplyOn>BF</ApplyOn> <Amount>0.0000</Amount> <Type>P</Type> <DiscountPLB>0.0000</DiscountPLB> <DiscountPLBType>F</DiscountPLBType> <DiscountPLBOn/> <Surcharge>2000.0000</Surcharge> </Airline> <Others> <Code/> <GDS>1</GDS> <WholeSalerFees>0</WholeSalerFees> <CommissionType>C</CommissionType> <ApplyOn>B</ApplyOn> <Amount>0.0000</Amount> </Others> </Airlines> </AgentMarkup> </FormData> <FormData/> </OriginDestinationOption> </OriginDestinationOptions> </AirItinerary> <AirItineraryPricingInfo UniqueIdentifier="1.0"> <ItinTotalFare> <BaseFare Amount="920" CurrencyCode="INR"/> <Taxes> <Tax Amount="0" CurrencyCode="INR" Description="Passenger Service Fee" FareBasisCode="F" TaxCode="PSF" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="2850" CurrencyCode="INR" Description="Fuel Surcharge" FareBasisCode="F" TaxCode="YQ" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="0" CurrencyCode="INR" Description="User Development Fee" FareBasisCode="F" TaxCode="UDF" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="187" CurrencyCode="INR" Description="Congestion Fee" FareBasisCode="F" TaxCode="YR" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="0" CurrencyCode="INR" Description="Web transaction Charges" FareBasisCode="F" TaxCode="WC" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="0" CurrencyCode="INR" Description="Transaction Fee" FareBasisCode="F" TaxCode="TF" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="891" CurrencyCode="INR" Description="Other Charges" FareBasisCode="F" TaxCode="OC" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> </Taxes> <TotalFare Amount="4848" CurrencyCode="INR"/> <ServiceTax Amount="0" Currency="INR" Description="Service Tax" ServiceTaxCode="ST" ServiceTaxRate="0"/> <Fees> <Fee Amount="0"/> <Fee Amount="0" FeeCode="YatraLCCSurcharge"/> </Fees> <Markups> <Markup Amount="0" CurrencyCode="INR" Description="0.0 wholesalerfees for client 1152" MarkupCode="DisplayMarkup" MarkupType="W" Type="C"/> <Markup Amount="0" CurrencyCode="INR" Description="0.0% on base fare for client - 1152" MarkupCode="DisplayMarkup" MarkupType="M" Type="C"/> <Markup Amount="0" CurrencyCode="INR" Description="0.0% on fuel surcharge 2850 -for client - 1152" MarkupCode="DisplayMarkup" MarkupType="M" Type="C"/> <Markup Amount="0" CurrencyCode="INR" Description="0.0 on base fare for client - 1152" MarkupCode="DisplayMarkup" MarkupType="M" Type="P"/> </Markups> </ItinTotalFare> <PTC_FareBreakdowns> <PTC_FareBreakdown> <PassengerTypeQuantity Code="ADT" Quantity="1"/> <FareBasisCodes> <FareBasisCode BaseFareRefundperPAX="170" CancelAmtValue="http://stackoverflow.com/questions/15749161/750" FareType="Refundable" RefundType="A" ResBookDesigCode="Economy" YatraOfflineFee="310" YatraOnlineFee="200">XXXXX</FareBasisCode> </FareBasisCodes> <PassengerFare> <BaseFare Amount="920.0" CurrencyCode="INR"/> <Taxes> <Tax Amount="0" Code="ADT" CurrencyCode="INR" Description="Passenger Service Fee" FareBasisCode="F" TaxCode="PSF" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="2850" Code="ADT" CurrencyCode="INR" Description="Fuel Surcharge" FareBasisCode="F" TaxCode="YQ" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="0" Code="ADT" CurrencyCode="INR" Description="User Development Fee" FareBasisCode="F" TaxCode="UDF" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="187" Code="ADT" CurrencyCode="INR" Description="Congestion Fee" FareBasisCode="F" TaxCode="YR" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="0" Code="ADT" CurrencyCode="INR" Description="Web transaction Charges" FareBasisCode="F" TaxCode="WC" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="0" Code="ADT" CurrencyCode="INR" Description="Transaction Fee" FareBasisCode="F" TaxCode="TF" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> <Tax Amount="891" Code="ADT" CurrencyCode="INR" Description="Other Charges" FareBasisCode="F" TaxCode="OC" TaxGroupCode="SF" TaxGroupName="Taxes & Fees"/> </Taxes> <TotalFare Amount="4848" CurrencyCode="INR"/> <ServiceTax Amount="0" Currency="INR" Description="Service Tax" ServiceTaxCode="ST" ServiceTaxRate="0"/> <Markups> <Markup Amount="0.0000" CurrencyCode="INR" Description="0.0 wholesalerfees for client 1152" MarkupCode="DisplayMarkup" MarkupType="W" Type="C"/> <Markup Amount="0" CurrencyCode="INR" Description="0.0 % on base fare for client - 1152" MarkupCode="DisplayMarkup" MarkupType="M" Type="C"/> <Markup Amount="0" Description="0.0% on fule surcharge 2850.0for client1152" MarkupCode="DisplayMarkup" MarkupType="M" Type="C"/> <Markup Amount="0" CurrencyCode="INR" Description="0.0 on base fare for client1152" MarkupCode="DisplayMarkup" MarkupType="M" Type="P"/> </Markups> </PassengerFare> <RefundInfo BaseFareRefundperPAX="170" CancelAmtValue="http://stackoverflow.com/questions/15749161/750" FareBasisUsed="-" RefundType="F" ResBookDesigCode="-" YatraOfflineFee="310" YatraOnlineFee="200"/> </PTC_FareBreakdown> </PTC_FareBreakdowns> </AirItineraryPricingInfo> <TicketingInfo DeliveryMethod="EMAIL" TicketTimeLimit="" TicketType="eTicket" TicketingStatus="" eTicketNumber=""> <TicketAdvisory Language="English"/> </TicketingInfo> </PricedItinerary> <PricedItinerary FareQuotePricedItinerary="false" FareType="Refundable" OriginDestinationRPH="DELBOMSG852SG20130420" ReturnOnly="false" SeatToSell="33" SequenceNumber="1.0" SupplierSystem="SGNAV"> <AirItinerary SupplierSystem="SGNAV"> <OriginDestinationOptions> <OriginDestinationOption Duration="02:10:00" FareBasisCode="F" FlightID="DELBOMSG852SG" ReturnOnly="false" SupplierCode="SGAPI" SupplierSystem="SGNAV" UniqueIdentifier="1.0"> <FlightSegment ArrivalDateTime="2013-04-20T17:20:00" DateWindow="" DepartureDateTime="2013-04-20T15:10:00" Duration="02:10:00" FlightNumber="852" LTD="SGAPI" NumberInParty="DELBOM" ResBookDesigCode="F" Status="33" StopQuantity="0" ValidConnectionInd="SGAPI"> <BookingClassAvail FareType="J" ResBookDesigCode="F"/> <DepartureAirport AirPortName="Indira Gandhi" CityName="New Delhi" CodeContext="IATA" LocationCode="DEL"/> <ArrivalAirport AirPortName="Chatrapati Shivaji" CityName="Mumbai" CodeContext="IATA" LocationCode="BOM"/> <Equipment AirEquipType="737"/> <MarketingAirline Code="SG" CodeContext="IATA" MatrixCode="SG" Name="Spice Jet" YTAirlineCode="SG"/> </FlightSegment> <FormData> <item> <SelectedFareCode>F</SelectedFareCode> <Fares> <item> <BaseAmount> <Amount>920.0</Amount> <CurrencyCode>INR</CurrencyCode> </BaseAmount> <PassengerTypeCode>ADT</PassengerTypeCode> <Meal/> <FareGroup>R</FareGroup> <ToSell>33</ToSell> <Cabin>1</Cabin> <FareCode>F</FareCode> </item> </Fares> <Flights> <item> <ArrivalDateTime>2013-04-20T17:20:00.000Z</ArrivalDateTime> <OpSuffix/> <NumberOfStops>0</NumberOfStops> <DepartureDateTime>2013-04-20T15:10:00.000Z</DepartureDateTime> <AircraftType>737</AircraftType> <DepartureTerminal/> <Overnight>false</Overnight> <Status/> <Origin>DEL</Origin> <ArrivalTerminal/> <ServiceType>J</ServiceType> <ArrivalTimeOffset>+0530</ArrivalTimeOffset> <Destination>BOM</Destination> <FlightLegs> <item> <IrregularOperationIndicator/> <Remarks></Remarks> <FlightDesignator>SG 852</FlightDesignator> <ScheduledDepartureTime>2013-04-20T15:10:00.000Z</ScheduledDepartureTime> <ScheduledArrivalTime>2013-04-20T17:20:00.000Z</ScheduledArrivalTime> <Lid>189</Lid> <DepartureDate>2013-04-20T15:10:00.000Z</DepartureDate> <Sold>2</Sold> <DepartureAirport>DEL</DepartureAirport> <OpSuffix/> <FlightDetail/> <AircraftType>737</AircraftType> <DepartureTerminal>1D</DepartureTerminal> <Overnight>false</Overnight> <Status>false</Status> <ArrivalTerminal>1D</ArrivalTerminal> <AircraftCode>737-800</AircraftCode> <ServiceType>J</ServiceType> <ArrivalTimeOffset>+0530</ArrivalTimeOffset> <JointOpDesig/> <Capacity>189</Capacity> <DepartureTimeOffset>+0530</DepartureTimeOffset> <ArrivalAirport>BOM</ArrivalAirport> </item> </FlightLegs> <DepartureTimeOffset>+0530</DepartureTimeOffset> <FlightNumber>852</FlightNumber> <CarrierCode>SG</CarrierCode> </item> </Flights> </item> <FareDifference> <TotalFare ADT="1" BaseFare="920-ADT 920.0" CHD="0" Cabin="Economy" HostName="railserver" INF="0" Rbd="J - F - 33" Tax="PSF-0YQ-2850UDF-0YR-187WC-0TF-0OC-891">4848</TotalFare> </FareDifference> <TicketingInfo DeliveryMethod="EMAIL" TicketTimeLimit="" TicketType="eTicket" TicketingStatus="" eTicketNumber=""> <TicketAdvisory Language="English"/> </TicketingInfo> <AgentMarkup> <Airlines> </PricedItinerary> </PricedItineraries> </OTA_AirLowFareSearchRS> </soapenv:Body></soapenv:Envelope>\[/code\]