Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Extracting ALT text from image links

by gav^ (Curate)
on Jun 25, 2002 at 14:23 UTC ( #177095=note: print w/replies, xml ) Need Help??


in reply to Extracting ALT text from image links

Just for completeness, here is an example using HTML::TreeBuilder:
use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new_from_content($html); foreach my $img ($tree->look_down('_tag', 'img')) { if ($img->attr('alt')) { print "Alt tag found: ", $img->attr('alt'), "\n"; } } $tree->delete;

gav^

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://177095]
help
Chatterbox?
[Corion]: marto:I hope you're well
[marto]: Corion crazy busy at the moment, with work (and a tpue), the kids and some external factors
[marto]: hopefully everything is good with you

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2017-02-24 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (353 votes). Check out past polls.