C# SelectNodes and SelectSingleNodes in HTML agility pack
Hello,
I'm having problem when selectsinglenodes from selectnodes.
HtmlWeb web = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = web.Load(url);
var nodes = doc.DocumentNode.SelectNodes("//table[@border='0' and @cellspacing='0' and @cellpadding='0']");
var listip = nodes.SelectSingleNode("./tbody");
if (nodes != null)
{
foreach (HtmlNode item in nodes)
{
if (item != null)
{
string s = item.InnerText;
listView1.Items.Add(s);
}
}
}
else
{
MessageBox.Show("Nothing found here");
}