#!/usr/bin/perl use warnings; use strict; use HTML::TreeBuilder; my $html = <<'HTML'; <a href="http://www.nowhere.com/?action=a1&param=p1">Some text</a> HTML my $tree = HTML::TreeBuilder->new_from_content( $html ); for my $elt ($tree->look_down ('_tag', 'a')) { print "\nA " . HTML::Entities::encode($elt->attr ('href')) . "\n\n +"; }
Others might involve hacking the modules you use.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: How to get undecoded html entities with HTML::TreeBuilder
by shmem
in thread How to get undecoded html entities with HTML::TreeBuilder
by Krambambuli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |