#!/usr/bin/perl -w use strict; use XML::LibXML; my $file = $ARGV[0] || die "Usage: $0 [uri|filename]\n"; my $doc = XML::LibXML->new->parse_html_file($file); print "Alt tags in $file:\n"; foreach my $alt ($doc->findnodes('//img/@alt')) { print "Alt tag: ", $alt->nodeValue, "\n"; } print "Done\n";
In reply to Re: Extracting ALT text from image links
by Matts
in thread Extracting ALT text from image links
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |