K
kjhjhjhjadsasda
Hi,
Im trying to use HTML::TokeParser to get all text with DIV tags, where
the DIV tag has class="x":
$stream=HTML::TokeParser->new(\$page);
while ($token=$stream->get_tag("div")) {
if ($token->[1]{class} eq "x") {
$text=$stream->get_trimmed_text("/div");
}
}
Problem with this is that it gives me the trimmed text obviously, eg
cleans away any html. I want everything with the DIV but cant find the
command for it in TokeParser...
Anyone know?
Thanks
Im trying to use HTML::TokeParser to get all text with DIV tags, where
the DIV tag has class="x":
$stream=HTML::TokeParser->new(\$page);
while ($token=$stream->get_tag("div")) {
if ($token->[1]{class} eq "x") {
$text=$stream->get_trimmed_text("/div");
}
}
Problem with this is that it gives me the trimmed text obviously, eg
cleans away any html. I want everything with the DIV but cant find the
command for it in TokeParser...
Anyone know?
Thanks