Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing simplexml_load_string to convert xml with multiple name spaces?
    primarykey
    data
    text
    <p>How would I use simplexml_load_string() to convert the following bit of xml to a usable php object?</p> <pre><code>&lt;soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;env:header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;soapenv:body&gt; &lt;v10:ratereply xmlns:v10="http://fedex.com/ws/rate/v10"&gt; &lt;v10:highestseverity xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;SUCCESS&lt;/v10:highestseverity&gt; &lt;v10:notifications xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;v10:severity&gt;SUCCESS&lt;/v10:severity&gt; &lt;v10:source&gt;crs&lt;/v10:source&gt; &lt;v10:code&gt;0&lt;/v10:code&gt; &lt;v10:message&gt;Request was successfully processed. &lt;/v10:message&gt; &lt;v10:localizedmessage&gt;Request was successfully processed. &lt;/v10:localizedmessage&gt; &lt;/v10:notifications&gt; &lt;v10:transactiondetail&gt; &lt;v10:customertransactionid&gt;&lt;/v10:customertransactionid&gt; &lt;/v10:transactiondetail&gt; &lt;v10:version&gt; &lt;v10:serviceid&gt;crs&lt;/v10:serviceid&gt; &lt;v10:major&gt;10&lt;/v10:major&gt; &lt;v10:intermediate&gt;0&lt;/v10:intermediate&gt; &lt;v10:minor&gt;0&lt;/v10:minor&gt; &lt;/v10:version&gt; &lt;v10:ratereplydetails xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;v10:servicetype&gt;FIRST_OVERNIGHT&lt;/v10:servicetype&gt; &lt;v10:packagingtype&gt;YOUR_PACKAGING&lt;/v10:packagingtype&gt; &lt;v10:deliverystation&gt;TCMA &lt;/v10:deliverystation&gt; &lt;v10:deliverydayofweek&gt;THU&lt;/v10:deliverydayofweek&gt; &lt;v10:deliverytimestamp&gt;2011-06-16T08:30:00&lt;/v10:deliverytimestamp&gt; &lt;v10:commitdetails&gt; &lt;v10:servicetype&gt;FIRST_OVERNIGHT&lt;/v10:servicetype&gt; &lt;v10:committimestamp&gt;2011-06-16T08:30:00&lt;/v10:committimestamp&gt; &lt;v10:dayofweek&gt;THU&lt;/v10:dayofweek&gt; &lt;v10:destinationservicearea&gt;A2&lt;/v10:destinationservicearea&gt; &lt;v10:brokertodestinationdays&gt;0&lt;/v10:brokertodestinationdays&gt; &lt;v10:documentcontent&gt;NON_DOCUMENTS&lt;/v10:documentcontent&gt; &lt;/v10:commitdetails&gt; &lt;v10:destinationairportid&gt;SEA&lt;/v10:destinationairportid&gt; &lt;v10:ineligibleformoneybackguarantee&gt;false&lt;/v10:ineligibleformoneybackguarantee&gt; &lt;v10:originservicearea&gt;A2&lt;/v10:originservicearea&gt; &lt;v10:destinationservicearea&gt;A2&lt;/v10:destinationservicearea&gt; &lt;v10:signatureoption&gt;SERVICE_DEFAULT&lt;/v10:signatureoption&gt; &lt;v10:actualratetype&gt;PAYOR_ACCOUNT_PACKAGE&lt;/v10:actualratetype&gt; &lt;v10:ratedshipmentdetails&gt; &lt;v10:shipmentratedetail&gt; &lt;v10:ratetype&gt;PAYOR_ACCOUNT_PACKAGE&lt;/v10:ratetype&gt; &lt;v10:ratescale&gt;6&lt;/v10:ratescale&gt; &lt;v10:ratezone&gt;2&lt;/v10:ratezone&gt; &lt;v10:pricingcode&gt;PACKAGE&lt;/v10:pricingcode&gt; &lt;v10:ratedweightmethod&gt;ACTUAL&lt;/v10:ratedweightmethod&gt; &lt;v10:dimdivisor&gt;194&lt;/v10:dimdivisor&gt; &lt;v10:fuelsurchargepercent&gt;16.5&lt;/v10:fuelsurchargepercent&gt; &lt;v10:totalbillingweight&gt; &lt;v10:units&gt;LB&lt;/v10:units&gt; &lt;v10:value&gt;1.0&lt;/v10:value&gt; &lt;/v10:totalbillingweight&gt; &lt;v10:totalbasecharge&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;46.3&lt;/v10:amount&gt; &lt;/v10:totalbasecharge&gt; &lt;v10:totalfreightdiscounts&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;0.0&lt;/v10:amount&gt; &lt;/v10:totalfreightdiscounts&gt; &lt;v10:totalnetfreight&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;46.3&lt;/v10:amount&gt; &lt;/v10:totalnetfreight&gt; &lt;v10:totalsurcharges&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;7.64&lt;/v10:amount&gt; &lt;/v10:totalsurcharges&gt; &lt;v10:totalnetfedexcharge&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;53.94&lt;/v10:amount&gt; &lt;/v10:totalnetfedexcharge&gt; &lt;v10:totaltaxes&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;0.0&lt;/v10:amount&gt; &lt;/v10:totaltaxes&gt; &lt;v10:totalnetcharge&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;53.94&lt;/v10:amount&gt; &lt;/v10:totalnetcharge&gt; &lt;v10:totalrebates&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;0.0&lt;/v10:amount&gt; &lt;/v10:totalrebates&gt; &lt;v10:surcharges&gt; &lt;v10:surchargetype&gt;FUEL&lt;/v10:surchargetype&gt; &lt;v10:description&gt;Fuel&lt;/v10:description&gt; &lt;v10:amount&gt; &lt;v10:currency&gt;USD&lt;/v10:currency&gt; &lt;v10:amount&gt;7.64&lt;/v10:amount&gt; &lt;/v10:amount&gt; &lt;/v10:surcharges&gt; &lt;/v10:shipmentratedetail&gt; &lt;v10:ratedshipmentdetails&gt; &lt;/v10:ratereplydetails&gt; &lt;/v10:ratereply&gt; &lt;/soapenv:body&gt; &lt;/env:header&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload