Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HTML::ElementTable::DataElement=HASH(0x15bb00c)

35 views
Skip to first unread message

JyGius

unread,
May 7, 2011, 4:08:50 AM5/7/11
to
Hi all...

I'm trying to parse an HTML Table with HTML::ElementTable with this
code:

my $schedaHtml = $ua->get($schedaLinkUrl->as_string);
my $te = new HTML::TableExtract( headers => [qw(Codice Taglie
DisponibilitÃ)] );
chomp(my $htmlstring = $schedaHtml->content);
$te->parse($htmlstring);
foreach my $ts ($te->table_states) {
foreach my $values ($ts->rows) {
my @a = @{$values};
print trim($a[0]) . ' ' . trim($a[1]) . ' ' . trim($a[2]) . "\n\n";
}
}

But when i run it I get this message

HTML::ElementTable::DataElement=HASH(0x15bb00c) for each table (I
suppose).
$htmlstring should be an html string, right? If I print with the
content method I get the entire html page, but if I pass this string
to HTML::ElementTable parse method ($te->parse($htmlstring);) I get
HTML::ElementTable::DataElement=HASH(0x15bb00c).

What's wrong with my code?

Many thanks.

Regards.

Gius.

vadm...@gmail.com

unread,
Apr 11, 2013, 4:55:55 PM4/11/13
to
Hello Guis,

I wonder if you already solved this problem (and you still remember what you did :)

Best regards,
0 new messages