HtmlAgilityPack xpath问题 !!!

public static readonly string xpath = "/html/body/div[6]/div[2]/div[1]/ul[1]/li", url = "www.zerodm.cn"; string html = HAPCommon.GetHtmlContentByURL(string.Format("http://{0}/", url)); HtmlAgilityPack.HtmlDocument htmldoc = new HtmlAgilityPack.HtmlDocument();           htmldoc.LoadHtml(html);           HtmlNodeCollection nodes = htmldoc.DocumentNode.SelectNodes(xpath); //HtmlAgilityPack.HtmlNode xhtml = new HtmlAgilityPack.HtmlNode(HtmlAgilityPack.HtmlNodeType.Element,htmldoc, 0); return nodes; Nodes is  null   xpath 是用 Firebug 找到的路径
隔江千里
浏览 414回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP