use YAPE::HTML;
$p = YAPE::HTML->new($CONTENT);
1 while $p->next; # to build the tree
@exclude = qw( a img );
$level = 2;
for ($p->root) { # top-level elements
print $_->fullstring(\@exclude, $level);
}
####
Hi there folks!
Visit my
porn site!
####
Hi there folks!
Visit my porn site!