内容:
<?xml version='1.0' encoding='UTF-8'?><ns1:getActivityOptionsResponse xmlns:ns1="http://www.ebay.com/marketplace/returns/v1/services"><ns1:ack>Success</ns1:ack><ns1:version>1.1.0</ns1:version><ns1:timestamp>2014-11-21T07:05:54.874Z</ns1:timestamp><ns1:activityOptions>ISSUE_REFUND</ns1:activityOptions></ns1:getActivityOptionsResponse>
これは名前空間付きのXMLです。指定するだけです
$s =<<< XML<?xml version='1.0' encoding='UTF-8'?><ns1:getActivityOptionsResponse xmlns:ns1="http://www.ebay.com/marketplace/returns/v1/services"><ns1:ack>Success</ns1:ack><ns1:version>1.1.0</ns1:version><ns1:timestamp>2014-11-21T07:05:54.874Z</ns1:timestamp><ns1:activityOptions>ISSUE_REFUND</ns1:activityOptions></ns1:getActivityOptionsResponse>XML;print_r(simplexml_load_string($s, null, 0, 'ns1', true));
SimpleXMLElement Object( [ack] => Success [version] => 1.1.0 [timestamp] => 2014-11-21T07:05:54.874Z [activityOptions] => ISSUE_REFUND)
ありがとう助けて