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.
Object Creation
(C#)
Chilkat.HtmlToText obj = new Chilkat.HtmlToText();
(VB.NET)
Dim obj As New Chilkat.HtmlToText()
Properties
DebugLogFilePath As String
To be documented soon.
DecodeHtmlEntities As Boolean
If True, then HTML entities are automatically decoded. For example & is automatically decoded to &. If this property is set to False, then HTML entities are not decoded. The default value is True.
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.
RightMargin As Integer
Used to control wrapping of text. The default value is 80. When the text gets close to this margin, the converter will try to break the line at a SPACE character.
SuppressLinks As Boolean
If True, then link URL's are preserved inline. For example, the following HTML fragment:
<p>Test <a href="http://www.chilkatsoft.com/">chilkat</a></p>
converts to:
Test chilkat <http://www.chilkatsoft.com/>
If this property is False, the above HTML would convert to:
Test chilkat
The default value of this property is True.
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.
|