3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $oMain = new DOMDocument(); $oMain->preserveWhiteSpace = false; $oMain->formatOutput = true; $oMain->loadXml('<?xml version="1.0"?><SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><SOAP:Body><air:AirPriceRsp xmlns:common_v19_0="http://www.travelport.com/schema/common_v19_0" xmlns:air="http://www.travelport.com/schema/air_v22_0" TransactionId="98C211960A076113466F7BECF086E1DC" ResponseTime="4399"><common_v19_0:ResponseMessage Code="0" Type="Info" ProviderCode="1P">* NONENDO/NONREF</common_v19_0:ResponseMessage><common_v19_0:ResponseMessage Code="0" Type="Info" ProviderCode="1P">* PRICING RULES VALIDATING CARRIER DEFAULT KL</common_v19_0:ResponseMessage><air:AirItinerary><air:AirSegment Key="0T" Group="0" Carrier="KL" FlightNumber="1609" ProviderCode="1P" Origin="AMS" Destination="FCO" DepartureTime="2013-11-08T21:00:00.000+01:00" ArrivalTime="2013-11-08T23:10:00.000+01:00" ChangeOfPlane="false" OptionalServicesIndicator="false"/><air:AirSegment Key="1T" Group="1" Carrier="KL" FlightNumber="1608" ProviderCode="1P" Origin="FCO" Destination="AMS" DepartureTime="2013-11-30T21:15:00.000+01:00" ArrivalTime="2013-11-30T23:40:00.000+01:00" ChangeOfPlane="false" OptionalServicesIndicator="false"/></air:AirItinerary><air:AirPriceResult><air:AirPricingSolution Key="2T" TotalPrice="EUR623.50" BasePrice="EUR354.00" ApproximateTotalPrice="EUR623.50" ApproximateBasePrice="EUR354.00" EquivalentBasePrice="EUR354.00" Taxes="EUR269.50"><air:AirSegmentRef Key="0T"/><air:AirSegmentRef Key="1T"/><air:AirPricingInfo Key="3T" TotalPrice="EUR328.98" BasePrice="EUR191.00" ApproximateTotalPrice="EUR328.98" ApproximateBasePrice="EUR191.00" Taxes="EUR137.98" LatestTicketingTime="2013-10-15T23:59:00.000+00:00" PricingMethod="Auto" PlatingCarrier="KL" ProviderCode="1P"><air:FareInfo Key="13T" FareBasis="TWKNL" PassengerTypeCode="ADT" Origin="AMS" Destination="ROM" EffectiveDate="2013-10-08T17:49:20.621+02:00" Amount="NUC125.56"><air:FareRuleKey FareInfoRef="13T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey></air:FareInfo><air:FareInfo Key="15T" FareBasis="TWKNL" PassengerTypeCode="ADT" Origin="ROM" Destination="AMS" EffectiveDate="2013-10-08T17:49:20.630+02:00" Amount="NUC125.56"><air:FareRuleKey FareInfoRef="15T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey></air:FareInfo><air:BookingInfo BookingCode="T" FareInfoRef="13T" SegmentRef="0T"/><air:BookingInfo BookingCode="T" FareInfoRef="15T" SegmentRef="1T"/><air:TaxInfo Category="RN" Amount="EUR15.40" Key="4T"/><air:TaxInfo Category="VV" Amount="EUR2.00" Key="5T"/><air:TaxInfo Category="CJ" Amount="EUR12.77" Key="6T"/><air:TaxInfo Category="EX" Amount="EUR2.06" Key="7T"/><air:TaxInfo Category="HB" Amount="EUR7.50" Key="8T"/><air:TaxInfo Category="IT" Amount="EUR12.92" Key="9T"/><air:TaxInfo Category="MJ" Amount="EUR0.89" Key="10T"/><air:TaxInfo Category="VT" Amount="EUR2.44" Key="11T"/><air:TaxInfo Category="YR" Amount="EUR82.00" Key="12T"/><air:FareCalc>ADT AMS KL ROM125.56KL AMS125.56NUC251.12END ROE.760562 KL XT12.77CJ2.06EX7.50HB12.92IT0.89MJ2.44VT82.00YR</air:FareCalc><air:PassengerType Code="ADT"/><air:BaggageAllowances><air:BaggageAllowanceInfo TravelerType="ADT" Origin="AMS" Destination="FCO" Carrier="KL"><air:URLInfo><air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSKL.BAGG</air:URL></air:URLInfo><air:BagDetails ApplicableBags="1stChecked" BasePrice="EUR0.00" ApproximateBasePrice="EUR0.00" TotalPrice="EUR0.00" ApproximateTotalPrice="EUR0.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:BagDetails ApplicableBags="2ndChecked" BasePrice="EUR100.00" ApproximateBasePrice="EUR100.00" TotalPrice="EUR100.00" ApproximateTotalPrice="EUR100.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:TextInfo><air:Text>1P</air:Text><air:Text>BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC.</air:Text></air:TextInfo></air:BaggageAllowanceInfo><air:BaggageAllowanceInfo TravelerType="ADT" Origin="FCO" Destination="AMS" Carrier="KL"><air:URLInfo><air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSKL.BAGG</air:URL></air:URLInfo><air:BagDetails ApplicableBags="1stChecked" BasePrice="EUR0.00" ApproximateBasePrice="EUR0.00" TotalPrice="EUR0.00" ApproximateTotalPrice="EUR0.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:BagDetails ApplicableBags="2ndChecked" BasePrice="EUR100.00" ApproximateBasePrice="EUR100.00" TotalPrice="EUR100.00" ApproximateTotalPrice="EUR100.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:TextInfo><air:Text>1P</air:Text><air:Text>BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC.</air:Text></air:TextInfo></air:BaggageAllowanceInfo></air:BaggageAllowances></air:AirPricingInfo><air:AirPricingInfo Key="17T" TotalPrice="EUR275.52" BasePrice="EUR144.00" ApproximateTotalPrice="EUR275.52" ApproximateBasePrice="EUR144.00" Taxes="EUR131.52" LatestTicketingTime="2013-10-15T23:59:00.000+00:00" PricingMethod="Auto" PlatingCarrier="KL" ProviderCode="1P"><air:FareInfo Key="27T" FareBasis="TWKNL" PassengerTypeCode="CNN" Origin="AMS" Destination="ROM" EffectiveDate="2013-10-08T17:49:20.653+02:00" Amount="NUC94.17"><air:FareTicketDesignator Value="CH25"/><air:FareRuleKey FareInfoRef="27T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey></air:FareInfo><air:FareInfo Key="29T" FareBasis="TWKNL" PassengerTypeCode="CNN" Origin="ROM" Destination="AMS" EffectiveDate="2013-10-08T17:49:20.655+02:00" Amount="NUC94.17"><air:FareTicketDesignator Value="CH25"/><air:FareRuleKey FareInfoRef="29T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey></air:FareInfo><air:BookingInfo BookingCode="T" FareInfoRef="27T" SegmentRef="0T"/><air:BookingInfo BookingCode="T" FareInfoRef="29T" SegmentRef="1T"/><air:TaxInfo Category="RN" Amount="EUR15.40" Key="18T"/><air:TaxInfo Category="VV" Amount="EUR2.00" Key="19T"/><air:TaxInfo Category="CJ" Amount="EUR12.77" Key="20T"/><air:TaxInfo Category="EX" Amount="EUR2.06" Key="21T"/><air:TaxInfo Category="HB" Amount="EUR7.50" Key="22T"/><air:TaxInfo Category="IT" Amount="EUR6.46" Key="23T"/><air:TaxInfo Category="MJ" Amount="EUR0.89" Key="24T"/><air:TaxInfo Category="VT" Amount="EUR2.44" Key="25T"/><air:TaxInfo Category="YR" Amount="EUR82.00" Key="26T"/><air:FareCalc>CNN AMS KL ROM94.17KL AMS94.17NUC188.34END ROE.760562 KL XT12.77CJ2.06EX7.50HB6.46IT0.89MJ2.44VT82.00YR</air:FareCalc><air:PassengerType Code="CNN"/><air:BaggageAllowances><air:BaggageAllowanceInfo TravelerType="CNN" Origin="AMS" Destination="FCO" Carrier="KL"><air:URLInfo><air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSKL.BAGG</air:URL></air:URLInfo><air:BagDetails ApplicableBags="1stChecked" BasePrice="EUR0.00" ApproximateBasePrice="EUR0.00" TotalPrice="EUR0.00" ApproximateTotalPrice="EUR0.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:BagDetails ApplicableBags="2ndChecked" BasePrice="EUR100.00" ApproximateBasePrice="EUR100.00" TotalPrice="EUR100.00" ApproximateTotalPrice="EUR100.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:TextInfo><air:Text>1P</air:Text></air:TextInfo></air:BaggageAllowanceInfo><air:BaggageAllowanceInfo TravelerType="CNN" Origin="FCO" Destination="AMS" Carrier="KL"><air:URLInfo><air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSKL.BAGG</air:URL></air:URLInfo><air:BagDetails ApplicableBags="1stChecked" BasePrice="EUR0.00" ApproximateBasePrice="EUR0.00" TotalPrice="EUR0.00" ApproximateTotalPrice="EUR0.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:BagDetails ApplicableBags="2ndChecked" BasePrice="EUR100.00" ApproximateBasePrice="EUR100.00" TotalPrice="EUR100.00" ApproximateTotalPrice="EUR100.00"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:TextInfo><air:Text>1P</air:Text></air:TextInfo></air:BaggageAllowanceInfo></air:BaggageAllowances></air:AirPricingInfo><air:AirPricingInfo Key="31T" TotalPrice="EUR19.00" BasePrice="EUR19.00" ApproximateTotalPrice="EUR19.00" ApproximateBasePrice="EUR19.00" Taxes="EUR0.00" LatestTicketingTime="2013-10-15T23:59:00.000+00:00" PricingMethod="Auto" PlatingCarrier="KL" ProviderCode="1P"><air:FareInfo Key="32T" FareBasis="TWKNL" PassengerTypeCode="INF" Origin="AMS" Destination="ROM" EffectiveDate="2013-10-08T17:49:20.656+02:00" Amount="NUC12.55"><air:FareTicketDesignator Value="IN90"/><air:FareRuleKey FareInfoRef="32T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5ffjXmuoKjIAQzOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey></air:FareInfo><air:FareInfo Key="34T" FareBasis="TWKNL" PassengerTypeCode="INF" Origin="ROM" Destination="AMS" EffectiveDate="2013-10-08T17:49:20.657+02:00" Amount="NUC12.55"><air:FareTicketDesignator Value="IN90"/><air:FareRuleKey FareInfoRef="34T" ProviderCode="1P">So05Ua7WWQ6LUnMVagmgWzIoZJ04F5fflvTVZQjlKmjOW8SrBX6figwnZa5vZPwFnJN2p9gbxJQel+e1Y8YwIV8pQurxVP92</air:FareRuleKey></air:FareInfo><air:BookingInfo BookingCode="T" FareInfoRef="32T" SegmentRef="0T"/><air:BookingInfo BookingCode="T" FareInfoRef="34T" SegmentRef="1T"/><air:FareCalc>INF AMS KL ROM12.55KL AMS12.55NUC25.10END ROE.760562</air:FareCalc><air:PassengerType Code="INF"/><air:BaggageAllowances><air:BaggageAllowanceInfo TravelerType="INF" Origin="AMS" Destination="FCO" Carrier="KL"><air:URLInfo><air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSKL.BAGG</air:URL></air:URLInfo><air:BagDetails ApplicableBags="1stChecked"><air:BaggageRestriction><air:TextInfo><air:Text>BAGGAGE CHARGES DATA NOT AVAILABLE</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:BagDetails ApplicableBags="2ndChecked"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:TextInfo><air:Text>1P</air:Text></air:TextInfo></air:BaggageAllowanceInfo><air:BaggageAllowanceInfo TravelerType="INF" Origin="FCO" Destination="AMS" Carrier="KL"><air:URLInfo><air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSKL.BAGG</air:URL></air:URLInfo><air:BagDetails ApplicableBags="1stChecked"><air:BaggageRestriction><air:TextInfo><air:Text>BAGGAGE CHARGES DATA NOT AVAILABLE</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:BagDetails ApplicableBags="2ndChecked"><air:BaggageRestriction><air:TextInfo><air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text></air:TextInfo></air:BaggageRestriction></air:BagDetails><air:TextInfo><air:Text>1P</air:Text></air:TextInfo></air:BaggageAllowanceInfo></air:BaggageAllowances></air:AirPricingInfo><air:FareNote Key="36T">LOWEST FARE ALREADY BOOKED IN THIS COMPARTMENT</air:FareNote><air:OptionalServices><air:OptionalServicesTotal TotalPrice="EUR283.99" BasePrice="EUR283.99"/><air:OptionalService Type="PreReservedSeatAssignment" TotalPrice="EUR20.00" SupplierCode="KL" PerTraveler="false" CreateDate="2013-10-08T15:49:21.249+00:00" ServiceStatus="Offered" SequenceNumber="539742" ServiceSubCode="0B5" SSRCode="RQST" IssuanceReason="A" AssessIndicator="MileageOrCurrency" ProviderCode="1P" Quantity="1" BasePrice="EUR20.00" ApproximateTotalPrice="EUR20.00" ApproximateBasePrice="EUR20.00" Taxes="EUR0.00" OptionalServicesRuleRef="1T"><common_v19_0:ServiceData AirSegmentRef="0T"/><common_v19_0:ServiceData AirSegmentRef="1T"/><common_v19_0:ServiceData/><common_v19_0:ServiceData/><common_v19_0:ServiceInfo><common_v19_0:Description>PREFERRED SEAT</common_v19_0:Description></common_v19_0:ServiceInfo><common_v19_0:Remark>KL 1609 - EUR20.00 PER PASSENGER PREFERRED SEAT</common_v19_0:Remark><common_v19_0:Remark>KL 1608 - EUR20.00 PER PASSENGER PREFERRED SEAT</common_v19_0:Remark><air:EMD FulfillmentType="2" AssociatedItem="Flight" RefundReissueIndicator="Reuse" Commissionable="false" Booking="SSR"/><air:AdditionalInfo Category="S7"/><air:FeeApplication Code="4">Per Traveler</air:FeeApplication></air:OptionalService><air:OptionalService Type="Baggage" TotalPrice="EUR56.91" SupplierCode="KL" PerTraveler="false" CreateDate="2013-10-08T15:49:21.268+00:00" ServiceStatus="Offered" SequenceNumber="100005" ServiceSubCode="0AB" SSRCode="ASVC" IssuanceReason="C" AssessIndicator="MileageOrCurrency" ProviderCode="1P" Quantity="1" BasePrice="EUR56.91" ApproximateTotalPrice="EUR56.91" ApproximateBasePrice="EUR56.91" Taxes="EUR0.00" OptionalServicesRuleRef="2T"><common_v19_0:ServiceData AirSegmentRef="0T"/><common_v19_0:ServiceData AirSegmentRef="1T"/><common_v19_0:ServiceData/><common_v19_0:ServiceData/><common_v19_0:ServiceInfo><common_v19_0:Description>TEST PREPAID BAG</common_v19_0:Description></common_v19_0:ServiceInfo><air:EMD FulfillmentType="2" AssociatedItem="Flight" RefundReissueIndicator="Refundable" Commissionable="false" Booking="SSR"/></air:OptionalService><air:OptionalService Type="Baggage" TotalPrice="EUR45.00" SupplierCode="KL" PerTraveler="false" CreateDate="2013-10-08T15:49:21.268+00:00" ServiceStatus="Offered" SequenceNumber="169000" ServiceSubCode="0CC" SSRCode="ABAG" IssuanceReason="C" AssessIndicator="MileageOrCurrency" Private="true" ProviderCode="1P" Quantity="1" BasePrice="EUR45.00" ApproximateTotalPrice="EUR45.00" ApproximateBasePrice="EUR45.00" Taxes="EUR0.00" OptionalServicesRuleRef="3T"><common_v19_0:ServiceData AirSegmentRef="0T"/><common_v19_0:ServiceData AirSegmentRef="1T"/><common_v19_0:ServiceData/><common_v19_0:ServiceData/><common_v19_0:ServiceInfo><common_v19_0:Description>1ST ADDITIONAL BAG</common_v19_0:Description></common_v19_0:ServiceInfo><air:EMD FulfillmentType="2" AssociatedItem="Flight" RefundReissueIndicator="Refundable" Commissionable="false" Booking="SSR"/><air:FeeApplication Code="4">Per Traveler</air:FeeApplication></air:OptionalService><air:OptionalService Type="Baggage" TotalPrice="EUR45.00" SupplierCode="KL" PerTraveler="false" CreateDate="2013-10-08T15:49:21.268+00:00" ServiceStatus="Offered" SequenceNumber="114250" ServiceSubCode="0CD" SSRCode="BBAG" IssuanceReason="C" AssessIndicator="MileageOrCurrency" Private="true" ProviderCode="1P" Quantity="1" BasePrice="EUR45.00" ApproximateTotalPrice="EUR45.00" ApproximateBasePrice="EUR45.00" Taxes="EUR0.00" OptionalServicesRuleRef="4T"><common_v19_0:ServiceData AirSegmentRef="0T"/><common_v19_0:ServiceData AirSegmentRef="1T"/><common_v19_0:ServiceData/><common_v19_0:ServiceData/><common_v19_0:ServiceInfo><common_v19_0:Description>2ND ADDITIONAL BAG</common_v19_0:Description></common_v19_0:ServiceInfo><air:EMD FulfillmentType="2" AssociatedItem="Flight" RefundReissueIndicator="Refundable" Commissionable="false" Booking="SSR"/><air:FeeApplication Code="4">Per Traveler</air:FeeApplication></air:OptionalService><air:OptionalService Type="Baggage" TotalPrice="EUR45.00" SupplierCode="KL" PerTraveler="false" CreateDate="2013-10-08T15:49:21.268+00:00" ServiceStatus="Offered" SequenceNumber="118218" ServiceSubCode="0CE" SSRCode="CBAG" IssuanceReason="C" AssessIndicator="MileageOrCurrency" Private="true" ProviderCode="1P" Quantity="1" BasePrice="EUR45.00" ApproximateTotalPrice="EUR45.00" ApproximateBasePrice="EUR45.00" Taxes="EUR0.00" OptionalServicesRuleRef="5T"><common_v19_0:ServiceData AirSegmentRef="0T"/><common_v19_0:ServiceData AirSegmentRef="1T"/><common_v19_0:ServiceData/><common_v19_0:ServiceData/><common_v19_0:ServiceInfo><common_v19_0:Description>3RD OR MORE ADDITIONAL BAG</common_v19_0:Description></common_v19_0:ServiceInfo><air:EMD FulfillmentType="2" AssociatedItem="Flight" RefundReissueIndicator="Refundable" Commissionable="false" Booking="SSR"/><air:FeeApplication Code="3">Per Item</air:FeeApplication></air:OptionalService><air:OptionalService Type="MealOrBeverage" TotalPrice="EUR72.08" SupplierCode="KL" PerTraveler="false" CreateDate="2013-10-08T15:49:21.269+00:00" ServiceStatus="Offered" SequenceNumber="100002" ServiceSubCode="VML" SSRCode="VGMI" IssuanceReason="C" AssessIndicator="MileageOrCurrency" ProviderCode="1P" SecondaryType="VideoGames" Quantity="1" BasePrice="EUR72.08" ApproximateTotalPrice="EUR72.08" ApproximateBasePrice="EUR72.08" Taxes="EUR0.00" OptionalServicesRuleRef="6T"><common_v19_0:ServiceData AirSegmentRef="0T"/><common_v19_0:ServiceData AirSegmentRef="1T"/><common_v19_0:ServiceData/><common_v19_0:ServiceData/><common_v19_0:ServiceInfo><common_v19_0:Description>TST VEGGIE ML</common_v19_0:Description></common_v19_0:ServiceInfo><air:EMD FulfillmentType="1" AssociatedItem="Flight" Commissionable="false" Booking="SSR"/></air:OptionalService><air:OptionalServiceRules Key="1T"><common_v19_0:ApplicationRules RequiredForAllTravelers="false"/></air:OptionalServiceRules><air:OptionalServiceRules Key="2T"><common_v19_0:ApplicationRules RequiredForAllTravelers="false"/></air:OptionalServiceRules><air:OptionalServiceRules Key="3T"><common_v19_0:ApplicationRules RequiredForAllTravelers="false"/></air:OptionalServiceRules><air:OptionalServiceRules Key="4T"><common_v19_0:ApplicationRules RequiredForAllTravelers="false"/></air:OptionalServiceRules><air:OptionalServiceRules Key="5T"><common_v19_0:ApplicationRules RequiredForAllTravelers="false"/></air:OptionalServiceRules><air:OptionalServiceRules Key="6T"><common_v19_0:ApplicationRules RequiredForAllTravelers="false"/></air:OptionalServiceRules></air:OptionalServices></air:AirPricingSolution></air:AirPriceResult></air:AirPriceRsp></SOAP:Body></SOAP:Envelope>'); function getElementByAttribute($oParent, $namespace, $nodeName, $attribute, $attributeValue) { $oList = $oParent->getElementsByTagNameNs($namespace, $nodeName); foreach($oList as $oCandidate) { if ($oCandidate->getAttribute($attribute) == $attributeValue) { return $oCandidate; } } } $oSegments = $oMain->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'AirSegment'); $oPricingInfoNodes = $oMain->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'AirPricingInfo'); foreach($oSegments as $oSegment) { foreach($oPricingInfoNodes as $oPricingInfoNode) { $oFareInfoNodes = $oPricingInfoNode->getElementsByTagNameNs('http://www.travelport.com/schema/air_v22_0', 'FareInfo'); foreach($oFareInfoNodes as $oFareInfoNode) { $oBookinfInformationNode = getElementByAttribute($oPricingInfoNode, 'http://www.travelport.com/schema/air_v22_0', "BookingInfo", "FareInfoRef", $oFareInfoNode->getAttribute("Key")); if ($oBookingInformationNode->getAttribute("SegmentRef") == $oSegment->getAttribute("Key")) { # Found matching segment and fare info; add segment origin/destination to fare info echo $oFareInfoNode->setAttribute("SegmentOrigin", $oSegment->getAttribute("Origin")); echo $oFareInfoNode->setAttribute("SegmentDestination", $oSegment->getAttribute("Destination")); } } } } //echo $oMain->saveXml(); ?>
Output for 7.0.5 - 7.1.0
Notice: Undefined variable: oBookingInformationNode in /in/AUjOP on line 22 Fatal error: Uncaught Error: Call to a member function getAttribute() on null in /in/AUjOP:22 Stack trace: #0 {main} thrown in /in/AUjOP on line 22
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: oBookingInformationNode in /in/AUjOP on line 22 Fatal error: Uncaught Error: Call to a member function getAttribute() on unknown in /in/AUjOP:22 Stack trace: #0 {main} thrown in /in/AUjOP on line 22
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Notice: Undefined variable: oBookingInformationNode in /in/AUjOP on line 22 Fatal error: Call to a member function getAttribute() on null in /in/AUjOP on line 22
Process exited with code 255.
Output for 5.3.0 - 5.5.38
Notice: Undefined variable: oBookingInformationNode in /in/AUjOP on line 22 Fatal error: Call to a member function getAttribute() on a non-object in /in/AUjOP on line 22
Process exited with code 255.