i have an application that needs to parse html files...right now i can get the file off the internet using a webclient and getdata... but the page returns as text... and i cant figure out how to convert that text into a html document. any help would be great...thanks in advance. heres the code:
Code:
Public Function GetPageHTML(ByVal URL As String) As String
Dim objWC As New System.Net.WebClient()
Return New System.Text.UTF8Encoding().GetString(objWC.DownloadData(URL))
End Function
Private Sub crawl(ByVal url As String)
Dim page As HtmlDocument = GetPageHTML(url)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
crawl("http://www.nexopia.com")
End Sub