First off, here's the code I'm having trouble with.
HtmlAgilityPack.HtmlDocument html = new HtmlAgilityPack.HtmlDocument();
string url = urlBox.Text;
html.LoadHtml("http://siteexplorer.search.yahoo.com/search?p=" + url + "&bwm=i&bwmo=d&bwmf=s");
HtmlNodeCollection links = html.DocumentNode.SelectNodes("id('result-list')/x:tbody/x:tr/x:td/a");
for (int i = 0; i < links.Count(); i++)
MessageBox.Show("Found: " + links[i]);
Okay, now on line 4, I'm getting the following error when this code runs.
"Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function."
I've Googled this, but the trouble is that I'm finding things for the XML Namespace, when I'm using the HTML Agility Pack - which doesn't have an argument for a namespace in the selectnodes method.
So... I'm thinking that my SelectNodes is actually running from System.Xml - but I don't know how to change that.
Any idea on how to fix this would be greatly appreciated.