I have a rather complex web page wher I want to extract some information.
For exemple I have the following line
<div class="global-menu-name"><img src="img.png" /><a href="hhhhh">FirstName</a> <a href="kkkkk">Name</a></div>
I want to detect this line and extract the two links href and Firstname and Name
The code detects the "class"tags but not all and not the one Im looking for.
THanks for your help
Bernard
What I have tried:
I have tried with the following code
Function deoderHTML(ByRef HtmlDoc As HtmlDocument) As Boolean
Dim html As HtmlNode = HtmlDoc.DocumentNode.Element("html")
Dim divTags As Object = HtmlDoc.DocumentNode.Descendants()
For Each tag As HtmlNode In divTags
If tag.Attributes("class") IsNot Nothing Then
If tag.Attributes("class").Value = "global-menu-name" Then
Console.WriteLine(tag.Attributes("class").Value)
Stop
End If
End If
Next