<div class="form-field wide-80 normal">1997-09-15</div>
我正在尝试选择其中的日期 1997-09-15。我尝试了这段代码,但它给出了“Xpath Exception was Unhandled”的错误代码有什么问题请帮助
string Url = "http://whois.domaintools.com/google.com";
HtmlWeb web = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = web.Load(Url);
var SpanNodes = doc.DocumentNode.SelectNodes("//div[@class=form-field wide-80 normal]");
if (SpanNodes != null)
{
foreach (HtmlNode SN in SpanNodes)
{
string text = SN.FirstChild.InnerText.Trim();
MessageBox.Show(text);
}
}