如何将xml转换为解析器以显示结果

时间:2016-11-05 00:51:15

标签: php xml web-services soap wsdl

我有这个XML代码,请帮我创建PHP解析器以在浏览器中显示结果。

用于航班搜索的XML,我想在浏览器中显示结果

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Header>
<AuthenticationSoapHeader xmlns="http://epowerv5.amadeus.com.tr/WS">
  <WSUserName>test</WSUserName>
  <WSPassword>test!</WSPassword>
</AuthenticationSoapHeader>
</soap:Header>
<soap:Body>
<SearchFlight xmlns="http://epowerv5.amadeus.com.tr/WS">
  <OTA_AirLowFareSearchRQ ProviderType="AmadeusAndExtProviders" RefundableType="AllFlights" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="0" MaxPrice="0">
    <OriginDestinationInformation>
      <DepartureDateTime>2016-11-18T00:01:00</DepartureDateTime>
      <OriginLocation LocationCode="AMS" MultiAirportCityInd="true" />
      <DestinationLocation LocationCode="LHR" />
    </OriginDestinationInformation>
    <OriginDestinationInformation>
      <DepartureDateTime>2016-11-25T00:01:00</DepartureDateTime>
      <OriginLocation LocationCode="LHR" />
      <DestinationLocation LocationCode="AMS" MultiAirportCityInd="true" />
    </OriginDestinationInformation>
    <TravelerInfoSummary>
      <AirTravelerAvail>
        <PassengerTypeQuantity Code="ADT" />
        <!--<PassengerTypeQuantity Code="CHD" />-->
      </AirTravelerAvail>
    </TravelerInfoSummary>
  </OTA_AirLowFareSearchRQ>
</SearchFlight>
</soap:Body>

0 个答案:

没有答案