I am currently using HtmlAgility Pack to parse some HTML for a forms input tags first, then the get the name of the ID or Class and list the input and the id=”something here or input: class=”something here” into a RichTextbox to review.
Here is my code.
Dim web As HtmlAgilityPack.HtmlWeb = New HtmlWeb()
Dim doc As HtmlAgilityPack.HtmlDocument = web.Load(TextBox1.Text)
Dim threadLinks As IEnumerable(Of HtmlNode) = doc.DocumentNode.SelectNodes("/input")
For Each link In threadLinks
Dim str As String = link.InnerHtml
RichTextBox1.Text = str.ToString
Next link
End Sub
Here is how you can do this (note that the SelectNodes selection string was fixed):