我得到了
的xml响应SimpleXMLElement Object
(
[@attributes] => Array
(
[version] => 2.0
[msg_type] => response
)
[header] => SimpleXMLElement Object
(
[param] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => SN
[value] => 1012
)
)
...
[9] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => ErrorInfo
[value] => NA
)
)
[10] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => ProcessTime
[value] => 0
)
)
)
)
[Heartbeat] => SimpleXMLElement Object
(
)
)
我试过了:
$version1 = (string) $xml->version; // expecting to get "2.0"
$errorinfo = (string) $xml->name->ErrorInfo; // expecting to get "NA"