CkHtmlToText Ruby Programming Reference Documentation
CkHtmlToText
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
# str is a CkString object (output) LastErrorHtml( str )
Error information in HTML format for the last method called.
# str is a CkString object (output) LastErrorText( str )
Error information in plain-text format for the last method called.
# str is a CkString object (output) LastErrorXml( str )
Error information in XML format for the last method called.
# Returns a boolean value get_Utf8( )
# b is a boolean (input) put_Utf8( b )
To be documented soon...
Methods
# Returns a boolean value IsUnlocked( )
Returns true if the component is already unlocked. Otherwise returns false.
# filename is a string (input) # srcCharset is a string (input) # outStr is a CkString object (output) # Returns a boolean value ReadFileToString( filename, srcCharset, outStr )
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 true for success, false for failure.
# filename is a string (input) # Returns a boolean value SaveLastError( filename )
Saves the last error information to an XML formatted file.
# html is a string (input) # outStr is a CkString object (output) # Returns a boolean value ToText( html, outStr )
Converts HTML to plain-text. Returns true for success, false for failure.
# code is a string (input) # Returns a boolean value UnlockComponent( code )
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.
# stringToWrite is a string (input) # filename is a string (input) # outpuCharset is a string (input) # Returns a boolean value WriteStringToFile( stringToWrite, filename, outpuCharset )
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.
# Returns a string lastErrorHtml( )
Error information in HTML format for the last method called.
# Returns a string lastErrorText( )
Error information in plain-text format for the last method called.
# Returns a string lastErrorXml( )
Error information in XML format for the last method called.
# filename is a string (input) # srcCharset is a string (input) # Returns a string readFileToString( filename, srcCharset )
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.
# html is a string (input) # Returns a string toText( html )
Converts HTML to plain-text.
|