|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re: Should I use; Html Parser, table extract, Extractorby mojotoad (Monsignor) |
| on Dec 21, 2005 at 17:23 UTC ( [id://518446]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Hi there !moose,
A couple of observations regarding two of the modules being mentioned, HTML::TableExtract and HTML::ElementTable: These play much better together than they used to in times past. So now you can use HTML::TableExtract to automatically return an HTML::ElementTable structure if you want, thereby bypassing the HTML::Parser code if you so desire:
Also, since you're fairly new to both modules, I'll point out that the normal operation of HTML::TableExtract is to return the raw text, stripped of all html. It is very similar in structure to the above code:
Alternatively, you can preserve the HTML in each cell as text:
Another option for H::TE that you might find useful is the 'decode' option for when you're extracting in text mode (without keeping the html). When this is disabled (decode => 0 ... it's enabled by default) then your codes for things such as 'nbsp' are not translated into their actual character -- that might make it easier for search and replace type operations.
Cheers,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||