【发布时间】:2016-07-04 05:19:15
【问题描述】:
我正在尝试读取 html 表格,以便使用 HtmlAgilityPack 读取和更改表格。我尝试了非常不同的网站,但我的代码不起作用。
SelectSingleNode 函数返回 null。此外,当我调用 SelectNodes 而不是 SelectSingleNode 时,结果再次为空。
示例链接 http://www.uefa.com/livescores/ 有一张桌子。我怎么看这个表?
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml("http://www.uefa.com/livescores/");
var result = doc.DocumentNode.SelectSingleNode("//table");
【问题讨论】:
-
但我的代码不起作用 什么不起作用?你看到什么错误?描述正在发生的事情。
标签: c# html html-table