Dim htmldoc As HtmlDocument = New HtmlDocument() htmldoc.LoadHtml(strPageContent) Dim root As HtmlNode = htmldoc.DocumentNode 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
Object reference not set to an instance of an object.
link.HasAttributes("title")
Public ReadOnly Property HasAttributes() As Boolean' has no parameters and its return type cannot be indexed.
root.SelectNodes("//a")
HasAttributes
HtmlNode.HasAttibutes
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)