PICA::SRUSearchParser - Parse a SRU response in XML and extract PICA+ records.
Creates a new Parser. See PICA::Parser for a description of parameters to define handlers (Field and Record).
Parse an SRU SearchRetrieve Response given as an XML string.
Get the number of read records so far.
Get the number of empty records that have been read so far. By default empty records are not passed to the record handler but counted.
Get the total number of records in the SRU result set. The result set may be split into several chunks.
Get the SRU resultSetId.
Do not directly call this methods!
SAX handler for XML start tag. On PICA+ records this calls the start handler of PICA::XMLParser, outside of records it parses the SRU response.
SAX handler for XML end tag. On PICA+ records this calls the end handler of PICA::XMLParser.
SAX handler for XML character data. On PICA+ records this calls the character data handler of PICA::XMLParser.
There seems to be a memory leak in the new() method, try while(1) { my $parser = PICA::SRUSearchParser->new(); }
A method to get the parameters in the header (numberOfRecords, resultSetId...) is needed to get the number of records before actually parsing the result.
Following requests of next records it not implemented yet.
There is no check whether the SRU server supports pica format.
Better error handling would be nice to skip invalid records but parse the rest.
We need test cases.
Jakob Voss <jakob.voss@gbv.de>
<jakob.voss@gbv.de>
Copyright (C) 2007 by Verbundzentrale Goettingen (VZG) and Jakob Voss
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install PICA::Record, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Record
CPAN shell
perl -MCPAN -e shell install PICA::Record
For more information on module installation, please visit the detailed CPAN module installation guide.