[Hello Developers as I have been solving such issue from a long time but didn't get any fruitful result which causes me to get help from senior people at StackOverflow as I am using HtmlAgilityPack in c# console application for web scraping as I have attached image, I want to parse the div from starting till the h3 tag contains hyperlink, how can i do it with HTML agility pack.
I have tried multiple solutions to parse but no fruitful result.
Attached Image too 1
Code is here:
static string url = "https://www.rozee.pk/job/jsearch/q/all/fc/1184/fin/1/";
HtmlWeb web = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc = web.Load(url);
var nodes = doc.DocumentNode.SelectSingleNode("//div[@class='job-listing opages npages']/div[@class='j-area']/div[@class='jlist float-left']/div[@class='job']/div[@class='jcont']/div[@class='jhead']/div[@class='jobt float-left']/h3[@title]/a[@href]").InnerText;
Console.WriteLine(nodes);`
It gives
Null Reference Exception was unhandled. Use the new keyword the create the instance of Object.