3 #use warnings; FIXME - Bug 2505
11 my $tree = HTML::TreeBuilder->new; # empty tree
13 $tree->parse_file($opt_f);
16 foreach my $c ($x->content_list) {
17 next if (ref($c) && $c->tag() eq "~comment");
18 next if (ref($c) && $c->tag() eq "script");
19 next if (ref($c) && $c->tag() eq "style");
23 if (ref($c) && $c->attr('alt')) {
24 print $c->attr('alt')."\n";
26 if (ref($c) && $c->attr('title')) {
27 print $c->attr('title')."\n";
29 if (ref($c) && $c->tag() eq "input" && $c->attr('value')) {
30 print $c->attr('value')."\n";
32 if (ref($c) && $c->tag() eq 'meta') {
33 print $c->attr('content')."\n ";
35 give_id($c) if ref $c; # ignore text nodes
39 $tree = $tree->delete;