Chilkat VB.NET HtmlToText Class Reference

HtmlToText

HTML to plain-text conversion component. The internal conversion process is much more sophisticated than can be accomplished with the simple regular-expression freeware codes found in the Internet. This is more than simply removing HTML tags from an HTML document.

Properties

LastErrorHtml As String (ReadOnly)

Error information in HTML format for the last method called.

LastErrorText As String (ReadOnly)

Error information in plain-text format for the last method called.

LastErrorXml As String (ReadOnly)

Error information in XML format for the last method called.

Methods

Function IsUnlocked() As Boolean

Returns true if the component is already unlocked. Otherwise returns false.

Function ReadFileToString(ByVal filename As String, ByVal srcCharset As String) As String

Convenience method for reading a text file into a string. The character encoding of the text file is specified by srcCharset. Valid values, such as "iso-8895-1" or "utf-8" are listed at: List of Charsets.

Returns Nothing on failure

Function SaveLastError(ByVal filename As String) As Boolean

Saves the last error information to an XML formatted file.

Function ToText(ByVal html As String) As String

Converts HTML to plain-text.

Returns Nothing on failure

Function UnlockComponent(ByVal code As String) As Boolean

Unlocks the component. An arbitrary unlock code may be passed to automatically begin a 30-day trial.

This class is included with the Chilkat HTML-to-XML conversion component license. A permanent unlock code for Chilkat HTML-to-XML should be used to unlock this object.

Function WriteStringToFile(ByVal stringToWrite As String, ByVal filename As String, ByVal outpuCharset As String) As Boolean

Convenience method for saving a string to a file. The character encoding of the output text file is specified by outpuCharset (the string is converted to this charset when writing). Valid values, such as "iso-8895-1" or "utf-8" are listed at: List of Charsets.