HTML을 구문 분석하기 위해 HtmlAgilityPack을 사용하고 있습니다.
요소에 특정 속성이 있는지 확인하고 싶습니다.
<a>
태그에 href
속성이 있는지 확인하고 싶습니다.
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