Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks I need to read all contents in specific HTML element.
Using HTML::TreeBuilder, the code seemed to work, but some tags like canvas are not fetched.
I don't know it's problem of HTML::Element or HTML::TreeBuilder. Is there a way to fix it? Or is there an alternative which works for all elements?
join '', map {$_->as_HTML()} $self->{html_tree}->look_down('id', 'my_i +d')->descendants();

Replies are listed 'Best First'.
Re: getting <canvas> tag using HTML::TreeBuilder
by choroba (Cardinal) on Apr 28, 2015 at 16:49 UTC
      Thanks for quick reply! that worked!!