NAME
Catmandu::Importer::PNX - A Primo normalized XML (PNX) importer
SYNOPSIS
# From the command line
$ catmandu convert PNX to YAML < ex/lido.xml
# From Perl
use Catmandu;
my $importer = Catmandu->importer('PNX',file => 'ex/pnx.xml');
my $n = $importer->each(sub {
my $hashref = $_[0];
# ...
});
DESCRIPTION
This is a Catmandu::Importer for converting PNX data (an XML Schema for Ex Libris' Primo search engine).
CONFIGURATION
- file
-
Read input from a local file given by its path. Alternatively a scalar reference can be passed to read from a string.
- fh
-
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. - encoding
-
Binmode of the input stream
fh
. Set to:utf8
by default. - fix
-
An ARRAY of one or more fixes or file scripts to be applied to imported items.
- xpath
-
Optional. An XPath expression, the XML container in which the PNX record can be found. Default : /oai:OAI-PMH/oai:ListRecords//oai:record/oai:metadata/*
METHODS
Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited.