$ 0 0 I believe this should do the trick. HtmlNodeCollection a = Links.DocumentNode.SelectNodes("//a[@id or @href]");