VB.NET
VB.NET
Convert HTML to Plain Text
Demonstrates how to convert HTML to plain text.Chilkat VB.NET Downloads
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim h2t As New Chilkat.HtmlToText
Dim html As String = h2t.ReadFileToString("c:/temp/test.html","utf-8")
If (h2t.LastMethodSuccess = False) Then
Debug.WriteLine(h2t.LastErrorText)
Exit Sub
End If
Dim plainText As String = h2t.ToText(html)
If (h2t.LastMethodSuccess = False) Then
Debug.WriteLine(h2t.LastErrorText)
Exit Sub
End If
Debug.WriteLine(plainText)