0
我仍然在學習如何解析不同的XML源,所以我想知道如何解析XML源,如下所示。有沒有可能解析這個不知道不同的XMl標籤?任何步驟,鏈接或教程將有所幫助。解析獲取帶有地理標記數據的RSS源
http://earthquake.usgs.gov/earthquakes/catalogs/eqs1hour-M1.xml
<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>USGS M 1+ Earthquakes</title>
<description>Real-time, worldwide earthquake list for the past hour</description>
<link>http://earthquake.usgs.gov/earthquakes/</link>
<dc:publisher>U.S. Geological Survey</dc:publisher>
<pubDate>Wed, 16 Nov 2011 11:47:10 GMT</pubDate>
<item>
<pubDate>Wed, 16 Nov 2011 11:41:25 GMT</pubDate>
<title>M 1.1, Central California</title>
<description>November 16, 2011 11:41:25 GMT</description>
<link>http://earthquake.usgs.gov/earthquakes/recenteqsus/Quakes/nc71682246.php</link>
<geo:lat>37.5637</geo:lat>
<geo:long>-118.8648</geo:long>
<dc:subject>1</dc:subject>
<dc:subject>pasthour</dc:subject>
<dc:subject>4.60 km</dc:subject>
<guid isPermaLink="false">nc71682246</guid>
</item>
<item>
<pubDate>Wed, 16 Nov 2011 11:15:18 GMT</pubDate>
<title>M 4.5, Kodiak Island region, Alaska</title>
<description>November 16, 2011 11:15:18 GMT</description>
<link>http://earthquake.usgs.gov/earthquakes/recenteqsww/Quakes/ak10358657.php</link>
<geo:lat>57.6877</geo:lat>
<geo:long>-153.8939</geo:long>
<dc:subject>4</dc:subject>
<dc:subject>pasthour</dc:subject>
<dc:subject>39.50 km</dc:subject>
<guid isPermaLink="false">ak10358657</guid>
</item>
</channel>
</rss>