I need to process list tags in order to extract data from them. The problem is that I need to analyze each list separably. I tried something like this:
List<HtmlAgilityPack.HtmlNode> tl = new List<HtmlNode (doc1.DocumentNode.SelectNodes("//ul"));
I was expecting that every tl element will be separate ul list, but it turns out that tl has only one element containing all li tags in html document. What am I doing wrong?
I’ve solved the problem with following code:
Now every uoList list member represents an ul or ol element which contains all li element’s inside that element.