我有一个像这样的 xml obj:
SimpleXMLElement Object
(
[@attributes] => Array
(
[id] => survey1_question01
[num] => 01
[text] => 1. What times will I take my 2 pills of Incivek (telaprevir) each day?
)
[response] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dose1] => 08:00 AM
[dose2] => 12:02 PM
[dose3] => 08:00 PM
)
)
我如何导航到 [文本] 和 [响应] ?问题是 $xmlTxt->results->question[1]->@attributes 不起作用。可能是@符号是我如何绕过这个的原因?