如何从网页中选择特定文字?

时间:2013-04-17 18:39:33

标签: c# html

我正在尝试选择按下网页搜索按钮后给出的一些结果;这些结果位于<span>标记内,该标记没有id或类。如何选择此特定范围?

Registration
ICANN Registrar:
MARKMONITOR INC.
Created:
1997-09-15
Expires:
2020-09-14
Updated:
2011-07-20

这是我通过此创建的示例代码我可以从网页搜索文本,但我想选择显示文本的特定范围"Creation Date of a website"

string downloadedString;
System.Net.WebClient client;

client = new System.Net.WebClient();
string text = "fun";
downloadedString = client.DownloadString("http://www.gmail.com");
if(downloadedString.Contains(text))
{
    MessageBox.Show(text);
}

0 个答案:

没有答案
相关问题