我无法从XML中获取数据而无法找出原因。从我的recking上下文将是//事件,然后所有其他属性是一个级别下来所以我需要.//抓住这些?我似乎无法抓住这一块。此外,我从未处理过此处的空格,并想知道如何做好,例如,抓住家庭id标签。循环数据包含在 任何帮助都非常赞赏。
<RSP api="site" request="get_events" ts="1383569509" ts_timezone="Australia/Darwin" rc="0">
<events>
<event external_id="2589501" id="775159">
<name separator="vs">Sparta Rotterdam v Achilles 29</name>
<home id="34482">Sparta Rotterdam</home>
<away id="82037">Achilles 29</away>
<datetime tz="GMT" tz_gmt_offset="0" unix="1383643800">2013-11-05 19:00:00</datetime>
<status>live</status>
<wp_ref>775159</wp_ref>
<parent_category_id>9</parent_category_id>
<category_id>5368</category_id>
<parent_category_name>Soccer Matches</parent_category_name>
<category_name>Dutch Jupiler League</category_name>
<market_count>4</market_count>
</event>
<event external_id="2594137" id="774957">
<name separator="vs">Maccabi Yavne v Hapoel Nazareth Illit</name>
<home id="379120">Maccabi Yavne</home>
<away id="124154">Hapoel Nazareth Illit</away>
<datetime tz="GMT" tz_gmt_offset="0" unix="1383550200">2013-11-04 17:00:00</datetime>
<status>live</status>
<wp_ref>774957</wp_ref>
<parent_category_id>9</parent_category_id>
<category_id>7098</category_id>
<parent_category_name>Soccer Matches</parent_category_name>
<category_name>Israeli Liga Leumit</category_name>
<market_count>1</market_count>
</event>
<events>
</RSP>