当前位置 : 主页 > 网页制作 > xml >

XmlSlurper解析RSS的实例代码

来源:互联网 收集:自由互联 发布时间:2021-08-10
rss version=2.0 xmlns:yweather=http://xml.weather.yahoo.com/ns/rss/1.0 xmlns:geo=http://www.w3.org/2003/01/geo/wgs84_pos# channel titleYahoo! Weather - Broomfield, CO/title yweather:location city=Broomfield region=CO country=US/ yweather:as
<rss version="2.0"
     xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
  <channel>
    <title>Yahoo! Weather - Broomfield, CO</title>
    <yweather:location city="Broomfield" region="CO"   country="US"/>
    <yweather:astronomy sunrise="6:36 am"   sunset="5:50 pm"/>
 
    <item>
      <title>Conditions for Broomfield, CO at 7:47 am MST</title>
      <pubDate>Fri, 27 Feb 2009 7:47 am MST</pubDate>
      <yweather:condition text="Partly Cloudy"
                          code="30"  temp="25"
                          date="Fri, 27 Feb 2009 7:47 am MST" />
    </item>
  </channel>
</rss>

以上就是XmlSlurper解析RSS的实例代码的详细内容,更多请关注自由互联其它相关文章!

网友评论