
HTML::Strip::Whitespace - Perl extension for stripping whitespace out of HTML.

use HTML::Strip::Whitespace qw(html_strip_whitespace);
my $html = <<"EOF";
<html>
<body>
<p>
Hello there!
</p>
</body>
</html>
EOF
my $buffer = "";
html_strip_whitespace(
'source' => \$html,
'out' => \$buffer
);

This module tries to strip as much whitespace from an HTML as it can without eliminating valid whitespace (like the one inside <pre>).
To use it call the function HTML::Strip::Whitespace::html_strip_whitespace, with named parameters. source is the HTML::TokeParser source for the HTML. out can be a reference to a buffer which will be filled with the stripped HTML, or alternatively a reference to a sub-routine or a file handle that will output it.

source is the HTML::TokeParser source for the HTML. out can be a reference to a buffer which will be filled with the stripped HTML, or alternatively a reference to a sub-routine or a file handle that will output it.

HTML Tidy with its Perl binding, which probably does a better and faster job of rendering this page.

Shlomi Fish, <shlomif@iglu.org.il>

Copyright (C) 2004 by Shlomi Fish
This library is free software; you can redistribute it and/or modify it under the terms of the MIT X11 license.