I'd like to know how many tags <a>
exist within div
, but the NullReferenceException
Exception is raised upon reaching XPath.
var baseURL = "AQUI VAI A MINHA URL";
var client = new HtmlWeb();
var pagina = client.Load(baseURL);
var quantidade = pagina.DocumentNode.SelectNodes("//*[@id='react - root']/section/main/article/div/div[1]/div[1]/a").Count;
Has he failed to get in the way or am I doing something wrong?