【发布时间】:2011-06-15 17:51:39
【问题描述】:
我必须从包含下表的 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 网页中提取一些信息:
//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 的使用示例。
【讨论】: