Datahub::Factory::Importer::Adlib - Import data from Adlib data dumps
use Datahub::Factory; use Data::Dumper qw(Dumper); my $adlib = Datahub::Factory->importer('Adlib')->new( file_name => '/tmp/export.xml', data_path => 'recordList.record.*' ); $adlib->importer->each(sub { my $item = shift; print Dumper($item); });
Datahub::Factory::Importer::Adlib uses Catmandu to fetch a list of records from an AdlibXML data dump. It returns an Importer.
file_name
Location of the Adlib XML data dump. It expects AdlibXML.
data_path
Optional parameter that indicates where the records are in the XML tree. It uses Catmandu::Fix syntax. By default, records are in the recordList.record.* path.
recordList.record.*
importer
A Importer that can be used in your script.
Pieter De Praetere <pieter at packed.be >
Copyright 2017- PACKED vzw
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Datahub::Factory Catmandu
To install Datahub::Factory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Datahub::Factory
CPAN shell
perl -MCPAN -e shell install Datahub::Factory
For more information on module installation, please visit the detailed CPAN module installation guide.