Answer the question
In order to leave comments, you need to log in
Why is html node collection null even though the site is fine?
Like on the site everything is fine, but through the code everything is bad.
Either
website :
private HtmlNode CheckXpath(string xpath)
{
if(!string.IsNullOrEmpty(xpath))
{
if (html.DocumentNode.SelectNodes(xpath) != null)
{
return html.DocumentNode.SelectNodes(xpath)[0];
}
}
return null;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question