Hey all..
below is the response which i get when i run my script
XML Resposne:
<?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext> Shipping</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>36.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.14</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.14</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery></GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.14</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.14</MonetaryValue></TotalCharges><Weight>36.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>36.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>
I want to convert that text into array..actually i wanted to store the value of Monetaryvalue which is 31.14 here into one variable..How cam i do this...
<TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>31.14</MonetaryValue></TotalCharges>
there is one function called xmlrpc_decode() ,but I am not sure how to use it..