用于Cricinfo的RSS阅读器-显示实时板球比分 [英] RSS reader for Cricinfo - to display live cricket score

查看:289
本文介绍了用于Cricinfo的RSS阅读器-显示实时板球比分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发用于显示实时板球比分的Windows Phone应用.

目前,我打算显示来自 http://static.cricinfo.com/rss/livescores.xml-考虑到该链接将显示所有实时比赛,让我们从上方选择一个链接,假定:
南非与斯里兰卡的对比

现在,我假设我将拥有与第一个链接类似的Xml节点和子元素,例如第一个链接,如"Channels","Title","Description"等,它们形成一个RSS.但是实际实时得分 URL 不包含这些xml节点.

因此,我的问题是是否要显示实时比分,我是否需要解析上述

I want to develop Windows phone app for displaying live cricket scores.

For now, I plan to display RSS feeds from http://static.cricinfo.com/rss/livescores.xml - considering that this link will show all the live matches, lets select one of the link from above which is assume:
SA Vs Sri Lanka

Now, I was assuming I''ll have similar Xml nodes and children as in the first link like "Channels","Title", "Description", etc which forms an RSS. But the actual live score URL does not contain those xml nodes.

So, my question is if I were to display the live score, do I need to parse the above URL which does not contain RSS feeds? Or is there any way around? Because if CricInfo (the site) decides to change the look and feel, then my parser will get screwed.

Any help is appreciated!

推荐答案

实时比赛页面不是RSS,而是HTML,因此,如果需要实时比赛信息,则需要解析HTML.
The live match page is not RSS, it is HTML so you need to parse the HTML if you want the live match information.

blockquote>


我们需要从标签中提取数据.我们应该遍历标签并显示标题标签,它给出了比赛的当前分数.

我们可以使用
http://static.cricinfo.com/rss/livescores.xml [
We need to extract data out of the tags. We should loop through the tags and display the title tag it gives the current score of the match.

We can use http://static.cricinfo.com/rss/livescores.xml[^] feed itself.


But as your requirement is different we need to parse html data only cos as you said its not a rss feed page..For example tag of class "playerName" fetches the player name and class "battingRuns" gets the runs scored..


请注意,Cricinfo上的信息是其版权,因此可能存在侵权问题.
Just be aware that the information on Cricinfo is their copyright, so there may be infringement issues.


这篇关于用于Cricinfo的RSS阅读器-显示实时板球比分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆