Advertisement
Guest User

Untitled

a guest
Oct 8th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. $xml = new SimpleXMLElement(file_get_contents($file));
  2. $xml->registerXPathNamespace("def", "http://schemas.datacontract.org/2004/07/Pull.BLL.Models.OTA");
  3.  
  4.  
  5. for this xml? (just copying a small part of the xml to be able to see the namespace)
  6.  
  7. <?xml version="1.0"?>
  8. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><GetHotelAvailResponse xmlns="http://tempuri.org/"><GetHotelAvailResult xmlns:a="http://schemas.datacontract.org/2004/07/Pull.BLL.Models.OTA" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:Criteria><a:AvailableOnlyIndicator i:nil="true"/><a:Criterion><a:Address><a:AddressLine i:nil="true"/><a:CityCode>1109342</a:CityCode><a:CityName i:nil="true"/><a:CountryCode>40</a:CountryCode><a:CountryName i:nil="true"/><a:PostalCode i:nil="true"/><a:StateProv i:nil="true"/><a:StateProvCode i:nil="true"/><a:ZoneCode i:nil="true"/><a:ZoneName i:nil="true"/></a:Address>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement