[librecat-dev] From Catmandu::Importer::SRU to MARC::Record
Magnus Enger
magnus at enger.priv.no
Wed Oct 26 11:33:58 CEST 2016
Hi, Johann!
On 26 October 2016 at 11:29, Johann Rolschewski <rolschewski at gmail.com> wrote:
> add_many() expects an array, so you should the to_array() method of the
> importer object:
>
> $exporter->add_many($importer->to_array);
Hm, with this code:
my $record;
my $exporter = Catmandu->exporter('MARC', file => \$record, type => "XML" );
$exporter->add_many($importer->to_array);
say Dumper $record;
I still get this as the whole contents of $record, though:
$VAR1 = '<?xml version="1.0" encoding="UTF-8"?>
<marc:collection
xmlns:marc="http://www.loc.gov/MARC21/slim"><marc:record></marc:record>';
Best regards,
Magnus
More information about the librecat-dev
mailing list