passing records from OAI-Harvester to MARC-Record
[email protected] ("KREYCHE, MICHAEL")
| Newsgroups | perl.perl4lib |
|---|---|
| Message-ID | <7CC27FCFE099964F8FDC7B8A91EED0DE0582E6D5@KENT_EXCHANGE02.KENTS.LOCAL> |
I'm trying something a little new for me and, as usual, the first time
is the hardest. I'm harvesting MARC records from a repository and want
to modify them. In the past I've used LWP to retrieve raw XML, parsed
it, and turned it into a MARC structure. Now I'm trying to do things the
"right" way.
Once I've got a MARCXML record object, it seems to me there ought to be
a simple way to turn it into a string and grab it, something like this:
$results = $harvester->listAllRecords( metadataPrefix => 'marc21'
);
while ( my $data = $results->next() ) {
my $header = $data->header();
my $metadata = $data->metadata();
my $marcxml = ... missing link is here ...
my $record = MARC::Record->new_from_xml( $marcxml );
... good stuff goes here ...
}
Or maybe there's a more direct way. Anyhow, I've looked around a bit and
haven't figured out a solution, so I would be greatly obliged if someone
could point me in the right direction.
TIA,
Mike
--
Michael Kreyche
Systems Librarian / Associate Professor
Libraries and Media Services
Kent State University
330-672-1918