5 my $tree = HTML::TreeBuilder->new; # empty tree
7 $tree->parse_file($opt_f);
10 foreach my $c ($x->content_list) {
11 next if (ref($c) && $c->tag() eq "~comment");
12 next if (ref($c) && $c->tag() eq "script");
13 next if (ref($c) && $c->tag() eq "style");
17 if (ref($c) && $c->attr('alt')) {
18 print $c->attr('alt')."\n";
20 if (ref($c) && $c->attr('title')) {
21 print $c->attr('title')."\n";
23 if (ref($c) && $c->tag() eq "input" && $c->attr('value')) {
24 print $c->attr('value')."\n";
26 if (ref($c) && $c->tag() eq 'meta') {
27 print $c->attr('content')."\n ";
29 give_id($c) if ref $c; # ignore text nodes
33 $tree = $tree->delete;