Is is possible to select nodes IF they have a certain attribute? The nodes I require all have a "data-rel" attribute. I want to select only the nodes that have that attribute, irrespective of the "data-rel" attributes value.
<a href="/someurl.php" data-rel="..."> I've tried ...
List<HtmlAgilityPack.HtmlNode> groups = doc.DocumentNode.SelectNodes("//a[contains(@data-rel)]").Distinct().ToList(); ... to no avail.