如何获取html网页?
问题描述:
我不得不提取HTML网页包含以下表中的一些信息:如何获取html网页?
//Http://www.example.com/12.html
//<html ... >
<table>
<tr>
<td>HIIIIIIIIIII</td> // this is what I need from this page
</tr>
<tr><td>bla bla bla</td></tr>
</table>
什么想法?
感谢ü
答
你应该看看Html Agility Pack,它提供/解析的好方法读取HTML(甚至是严重的形成)
在此S.O. question,你可以找到如何提取表数据的样本。 和this question包含使用LINQ的示例。