ChilkatHtmlToText ActiveX Reference

ChilkatHtmlToText

(Not yet released) 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 (read-only)

Error information in HTML format for the last method called.

LastErrorText As String (read-only)

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

LastErrorXml As String (read-only)

Error information in XML format for the last method called.

Methods

IsUnlocked() As Long

Returns 1 if the component is already unlocked. Otherwise returns 0.

ReadFileToString(filename As String, 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 a null on failure

SaveLastError(logFilename As String) As Long

Saves the last error information to an XML formatted file.

ToText(html As String) As String

Converts HTML to plain-text.

Returns a null on failure

UnlockComponent(code As String) As Long

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.

WriteStringToFile(stringToWrite As String, filename As String, outpuCharset As String) As Long

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.