I am trying to use HtmlAgilityPack to search for elements inside a website. My problem is this:
I created a universal Windows 8 application (C #)
With the NuGet manager, I added:
using System.Net.Http; using HtmlAgilityPack;
Then I did:
string htmlPage; using (var client = new HttpClient()) { htmlPage = await client.GetStringAsync("http://www.domain.de/"); } HtmlDocument myDocument = new HtmlDocument(); myDocument.LoadHtml(htmlPage);
But the visual studio says:
Error 1 'HtmlAgilityPack.HtmlNode' does not contain a definition for 'SelectNodes'
I was already looking for a problem, but all websites just solved another problem when the code said “DocumentElement” instead of “DocumentNode”.
Do you have any clues?
Thanks!
source share