in reply to Inspecting each element in a tree, specifically HTML::Tree

I've only used Perl for 2 weeks, so apologies for my likely ignorance.

You're so close its not even funny, just use look_down to examine every element. Read all about it in HTML::Tree/HTML::Tree::Scanning

Or go the declarative route (xpath), use HTML::TreeBuilder::XPath/htmltreexpather.pl, see examples and walkthroughs: Parsing HTML / Re^4: Parsing HTML, A regex question , NASA's Astronomy Picture of the Day / Re: NASA's Astronomy Picture of the Day ....

  • Comment on Re: Inspecting each element in a tree, specifically HTML::Tree

Replies are listed 'Best First'.
Re^2: Inspecting each element in a tree, specifically HTML::Tree
by hulot (Initiate) on Jul 25, 2012 at 19:07 UTC

    Thanks for all the useful comments.

    I have got the grips with this instance of recursion and got the original HTML::Tree method to work. I will also take a look at Web::Query.