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']")
1
0
7/18/2012 5:50:29 PM

Accepted Answer

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

1
7/18/2012 5:58:31 PM


Related Questions





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