我想开发用于显示实时板球比分的Windows Phone应用. 目前,我打算显示来自 static.cricinfo/rss/livescores.xml-考虑到该链接将显示所有实时比赛,让我们从上方选择一个链接,假定: 南非与斯里兰卡的对比 现在,我假设我将拥有与第一个链接类似的Xml节点和子元素,例如第一个链接,如"Channels","Title","Description"等,它们形成一个RSS.但是实际实时得分 URL 不包含这些xml节点. 因此,我的问题是是否要显示实时比分,我是否需要解析上述 URL 哪个不包含RSS提要?还是有什么办法?因为如果CricInfo(该站点)决定改变外观,那么我的解析器就会搞砸了. 感谢您的帮助!
I want to develop Windows phone app for displaying live cricket scores. For now, I plan to display RSS feeds from static.cricinfo/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>
我们需要从标签中提取数据.我们应该遍历标签并显示标题标签,它给出了比赛的当前分数. 我们可以使用 static.cricinfo/rss/livescores.xml [ ^ ]源本身. 但是由于您的要求不同,我们需要解析html数据,因为您说的不是rss提要页面,而仅是cos.例如,"playerName"类的标记获取播放器名称,而"battingRuns"类获取运行分数. 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 static.cricinfo/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阅读器
发布评论