NAME
Catmandu::Importer::PICA - Package that imports PICA+ XML data
VERSION
version 0.02
SYNOPSIS
use Catmandu::Importer::PICA;
my $importer = Catmandu::Importer::PICA->new(file => "pica.xml", type=> "XML");
my $n = $importer->each(sub {
my $hashref = $_[0];
# ...
});
PICA
Parse PICA XML to native Perl hash containing two keys: '_id' and 'record'.
{
'record' => [
[
'001@',
'',
'_',
'',
'0',
'703'
],
[
'001A',
'',
'_',
'',
'0',
'2045:10-03-11'
],
[
'028B',
'01',
'_',
'',
'd',
'Thomas',
'a',
'Bartzanas'
]
'_id' => '658700774'
},
METHODS
new(file => $filename,type=>$type)
Create a new PICA importer for $filename. Use STDIN when no filename is given. Type describes the sytax of the PICA records. Currently we support: PICA+ XML.
count
each(&callback)
...
Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited. The Catmandu::Importer::PICA methods are not idempotent: PICA feeds can only be read once.
SEE ALSO
AUTHOR
Johann Rolschewski
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Johann Rolschewski.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.