使用html-agility-pack查找具有唯一类和id的div

时间:2012-07-18 17:50:29

标签: c# vb.net html-agility-pack

如何在htmlagilitypack中获得所有具有 class ='round' id ='footer'的div?

我以为我可以在下面做,但它不起作用?

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

1 个答案:

答案 0 :(得分:1)

XPath看起来对我来说,我会仔细检查HTML以确保它包含这样的元素。

相关问题