Hi -
I'm pulling records from the WorldCat Search API in MARCXML, and need to
convert them to binary MARC for further evaluation, which I'll do via
MARC::Record.
Problem: Converting from MARCXML via MARC::File::XML seems to require
reading the records from a file. I've already got the XML stored in a
variable, retrieved via LWP::Simple->get().
Do I have to write the XML to a file, then read it in again to convert it?
Or am I just missing something obvious?
I've tried things like:
$xml = get($api_call); # also verified that $xml now contains MARCXML for 1
or more records
my $batch = MARC::File::XML->in($xml);
while (my $record = $batch->next()) {
print $record;
}
but I get the error: Can't call method "next" on an undefined value
Thanks --Andy