Find divs with a unique class and id using html-agility-pack

c# html-agility-pack vb.net

Question

How do I get all divs that have a class = 'round' and a id = 'footer' in the htmlagilitypack?

I thought I could do th below but it does not work?

Dim s As HtmlNodeCollection = htmlDoc.DocumentNode.SelectNodes("//div[@class ='round' and @id='footer']")

Accepted Answer

The XPath looks right to me, I would double check the HTML to be sure it includes such element.



Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow