NAME

Datahub::Factory::Importer::MSK - Import data from Adlib data dumps as used by the MSK

SYNOPSIS

use Datahub::Factory::Importer::MSK;
use Data::Dumper qw(Dumper);

my $msk = Datahub::Factory::Importer::MSK->new(
    file_name => '/tmp/msk.xml',
    data_path => 'recordList.record.*'
);

$msk->importer->each(sub {
    my $item = shift;
    print Dumper($item);
});

DESCRIPTION

Datahub::Factory::Importer::MSK uses Catmandu to fetch a list of records from an AdlibXML data dump generated by the MSK. It returns an Importer.

PARAMETERS

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.

ATTRIBUTES

importer

A Importer that can be used in your script.

AUTHOR

Pieter De Praetere <pieter at packed.be >

COPYRIGHT

Copyright 2017- PACKED vzw

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Datahub::Factory Datahub::Factory::Adlib Catmandu