hi,
having trouble parsing a bunch of html held in a scalar. i've read through html::parser and html::treebuilder and i still can't tell exactly what i need to do. so, i have a var with tons of html code in it, and let's say i want to print out everything contained between <td> and </td> tags.
can someone give me a quick example? thanks!
i started with
use HTML::TreeBuilder;
my $data = "lots_of_hmtl";
my $parser = HTML::TreeBuilder->new_from_content;
$parser->parse($data);
now what do i do to get all content between all <td> and </td> tags?
thanks!
having trouble parsing a bunch of html held in a scalar. i've read through html::parser and html::treebuilder and i still can't tell exactly what i need to do. so, i have a var with tons of html code in it, and let's say i want to print out everything contained between <td> and </td> tags.
can someone give me a quick example? thanks!
i started with
Code:
use HTML::TreeBuilder;
my $data = "lots_of_hmtl";
my $parser = HTML::TreeBuilder->new_from_content;
$parser->parse($data);
now what do i do to get all content between all <td> and </td> tags?
thanks!