3 #use warnings; FIXME - Bug 2505
7 my $tree = HTML
::TreeBuilder
->new; # empty tree
9 $tree->parse_file($opt_f);
12 foreach my $c ($x->content_list) {
13 next if (ref($c) && $c->tag() eq "~comment");
14 next if (ref($c) && $c->tag() eq "script");
15 next if (ref($c) && $c->tag() eq "style");
19 if (ref($c) && $c->attr('alt')) {
20 print $c->attr('alt')."\n";
22 if (ref($c) && $c->attr('title')) {
23 print $c->attr('title')."\n";
25 if (ref($c) && $c->tag() eq "input" && $c->attr('value')) {
26 print $c->attr('value')."\n";
28 if (ref($c) && $c->tag() eq 'meta') {
29 print $c->attr('content')."\n ";
31 give_id
($c) if ref $c; # ignore text nodes
35 $tree = $tree->delete;