我一直在尝试访问 SimpleXmlObject 中的元素。我只需要访问“applicationID”,但无法到达那里。我已经从以下代码成功创建了一个 SimpleXmlObject:(我截断了 10 个响应文档中的 9 个)
<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>