NAME

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

SYNOPSIS

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
    );

DESCRIPTION

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.

AUTHOR

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

COPYRIGHT AND LICENSE

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.