【发布时间】:2014-05-09 10:55:46
【问题描述】:
$nc_response = file_get_contents( $url );
$nc_return = simplexml_load_string($nc_response);
// return
SimpleXMLElement Object
(
[DomainCheckResult] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Domain] => mydomain.com
[Available] => false
[ErrorNo] => 0
[Description] =>
)
)
)
我如何访问对象@attributes?
$nc_return->CommandResponse->DomainCheckResult->{'@attributes'} *// dont work*
【问题讨论】:
标签: php xml file-get-contents