Jan 28, 2013 at 10:22 AM
Edited Jan 28, 2013 at 1:15 PM
Here you go here is an example of how i would do it..
StreamReader sr = new StreamReader(@"C:\Development\sample.htm");
string lines = sr.ReadToEnd();
HtmlDocument hp = new HtmlDocument();
var nodes = hp.DocumentNode.SelectNodes("//tbody[@class='result']");
foreach (var item in nodes)
var price = item.SelectSingleNode(".//span[@class='price']").InnerText;
var shipping_block = item.SelectSingleNode(".//div[@class='shipping_block']");
var price_shipping = shipping_block.SelectSingleNode(".//span[@class='price_shipping']").InnerText;
var word_shipping = shipping_block.SelectSingleNode(".//span[@class='word_shipping']").InnerText;
Hope this points you in the right direction..
what i looked for was the table which held the results. so i looked for tbody where the class attribute was result. then looked for any child of that that was a span with the class attribute price and got the txt from that. and did similar for the