我被困在試圖訪問我的SimpleXmlObject中的元素。我需要訪問'applicationID',但遇到麻煩很麻煩。我已經成功地從下面的代碼創建的SimpleXmlObject:(我的10響應文檔的截短9)包含responseHeader的PHP SimpleXML
<response>
<lst name='responseHeader'>
<int name='status'>0</int>
<lst name='params'>
<str name='q'>applicationDateAdded:NOW()-1</str>
<str name='wt'>xml</str>
</lst>
</lst>
<result name='response' numFound='10' start='0'>
<doc>
<date name='applicationDateAdd'>2012-02-28T16:00:00Z</date>
<arr name='applicationDescript'>
<str>description</str>
<str>desc</str>
</arr>
<bool name='applicationFeatured'>false</bool>
<str name='applicationId'>APPID-00000000017</str>
<str name='id'>APPID-00000000017</str>
<str name='type'>APPLICATION</str>
</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
<doc>...</doc>
</result>
</response>