作者:ShenTing止想念 | 来源:互联网 | 2023-05-17 18:22
IneedanadviceforaprojectIamabouttobegin.我需要为即将开始的项目提供建议。Infewwords,myapplicationh
I need an advice for a project I am about to begin.
我需要为即将开始的项目提供建议。
In few words, my application has to go to a certain soccer website, download the HTML and extract the necessary data.
简而言之,我的应用程序必须去某个足球网站,下载HTML并提取必要的数据。
This is what I have done so far:
这是我到目前为止所做的:
:: 1) Go to a certain soccer website (ex. http://www.livescore.com/default.dll?page=england) and download the HTML using WebClient.
:: 1)访问某个足球网站(例如http://www.livescore.com/default.dll?page=england)并使用WebClient下载HTML。
:: 2) Using SgmlReader convert the HTML to XML
:: 2)使用SgmlReader将HTML转换为XML
:: 3) Using XmlDocument retrieve the data I am looking for. Usually this involves:
:: 3)使用XmlDocument检索我要查找的数据。通常这包括:
::::::: 3.1) Retrieving nodes using GetElementsByTagName() (ex. GetElementsByTagName("tr"))
::::::: 3.1)使用GetElementsByTagName()检索节点(例如GetElementsByTagName(“tr”))
::::::: 3.2) Looping through the list of nodes returned by the GetElementsByTagName() method
::::::: 3.2)循环访问GetElementsByTagName()方法返回的节点列表
Is there a better way to do what I trying to do?
有没有更好的方法来做我想做的事情?
I was thinking of LINQ to XML. Do you think this will improve performance?
我在想LINQ to XML。你认为这会改善表现吗?
Any suggestions or comments would be greatly appreciated!
任何建议或意见将不胜感激!
3 个解决方案