Another option if you are in Perl land would be to take a look at Tim
Brody's HTTP::OAI library [1] which returns XML::DOM::Document objects
for record metadata, which you can walk around in and use to evaluate
xpaths:
--
use HTTP::OAI;
my $harvester = HTTP::OAI::Harvester->new(
baseURL => 'http://memory.loc.gov/cgi-bin/oai2_0'
);
my $response = $harvester->ListRecords(metadataPrefix => 'mods');
while (my $record = $response->next()) {
print $record->metadata()->dom()->findvalue('//valid/xpath/here'), "\n";
}
--
I left the xpath as an exercise for the reader since I couldn't figure
out how to set use the http://www.loc.gov/mods/v3 namespace properly.
Ahh, namespaces :-)
//Ed
[1] http://search.cpan.org/dist/HTTP-OAI/
|