THTML2TextRenderer.Render function
Parses the HTML and renders the plain text output.
Declaration
function Render(aMaxLines: Integer=MaxInt): stringArguments
aMaxLines | Maximum number of lines to process in the method. |
Function result
String with the plain text content extracted from the HTML.
Description
Render is a
String function used to parse the HTML
passed as an argument to the constructor, and to render the plain text output
in the return value. The output is limited to the number of lines specified
in the
aMaxLines argument. The default value for the argument is
the
MaxInt constant.
AddOutput,
HtmlTag, and
HtmlEntity return
False if
aMaxLines was exceeded.
Renders calls the Reset method to set the initial values for
members and flags used in the class instance. The parsing mechanism looks for
HTML tags and character entities/references, processes their content, and
calls the AddOutput method. Whitespace (characters #32, #9, #10,
and #13) between tags and entities is always normalized into a single space
character.
Render calls the HtmlTag, HtmlEntity, and AddOutput methods to process the HTML content passed to the method.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
