【问题标题】:how to get html web page?如何获取html网页?
【发布时间】: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>

有什么想法吗?
谢谢你

【问题讨论】:

    标签: c# html


    【解决方案1】:

    您应该看看Html Agility Pack,它提供了解析/读取 HTML(甚至格式不正确)的好方法

    在这个S.O. question,您可以找到如何提取表格数据的示例。 this question 包含 LINQ 的使用示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-12
      • 2012-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-16
      相关资源
      最近更新 更多