XPath Query Problem using HTML Agility Pack
问题 I'm trying to scrape the price field from this website using the HTML Agility Pack. My code is as follows; var web = new HtmlWeb(); var doc = web.Load(String.Format(overClockersURL, componentID)); var priceContent = doc.DocumentNode.SelectSingleNode("//*[@id=\"prodprice\"]"); I obtained the XPath query by using Firebug's " Copy as XPath " feature. The problem I'm having is that SelectSingleNode is returning null - it doesn't seem to find the element specified by the query. I'm a bit stumped