title: Check if element has a specific attribute using HtmlAgilityPack in VB.Net
body: <p>I'm using HtmlAgilityPack to parse HTML.</p>
  
  <p>I want to check if an element has a specific attribute.</p>
  
  <p>I want to check whether an <code>&lt;a&gt;</code> tag has the <code>href</code> attribute.</p>
  
  <pre><code>Dim doc As HtmlDocument = New HtmlDocument()
  
  doc.Load(New StringReader(content))
  
  Dim root As HtmlNode = doc.DocumentNode
  Dim anchorTags As New List(Of String)
  
  For Each link As HtmlNode In root.SelectNodes("//a")
      If link.HasAttributes("href") Then doSomething() 'this doesn't work because hasAttributes only checks whether an element has attributes or not
  Next
  </code></pre>