Catmandu::Importer::HTML - An HTML importer
# From the command line $ catmandu convert HTML to YAML < ex/test.html # From Perl use Catmandu; my $importer = Catmandu->importer('HTML',file => 'ex/test.html'); my $n = $importer->each(sub { my $hashref = $_[0]; # ... });
This is a Catmandu::Importer for converting HTML data using the HTML::TokeParser parser.
Read input from a local file given by its path. Alternatively a scalar reference can be passed to read from a string.
Read input from an IO::Handle. If not specified, Catmandu::Util::io is used to create the input stream from the file argument or by using STDIN.
file
Binmode of the input stream fh. Set to :utf8 by default.
fh
:utf8
An ARRAY of one or more fixes or file scripts to be applied to imported items.
Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited.
Catmandu::Importer, HTML::TokeParser
To install Catmandu::HTML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::HTML
CPAN shell
perl -MCPAN -e shell install Catmandu::HTML
For more information on module installation, please visit the detailed CPAN module installation guide.