Jakob Voß > PICA-Record > PICA::SRUSearchParser

Download:
PICA-Record-0.583.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.49   Source  

NAME ^

PICA::SRUSearchParser - Parse a SRU response in XML and extract PICA+ records.

SYNOPSIS ^

    $parser = PICA::SRUSearchParser->new();
    $xmlparser = $parser->parse( $sru );

    print "numberOfRecords: " . $parser->numberOfRecords . "\n";
    print "resultSetId: " . $parser->resultSetId . "\n";
    print "result: " . $xmlparser->counter() . "\n";

METHODS ^

new ( [ $xmlparser ] )

Creates a new XML parser to parse an SRU Search Response document. PICA Records are passed to a PICA::XMLParser that must be provided.

parse( $document )

Parse an SRU SearchRetrieve Response (given as XML document) and return the PICA::XMLParser object that has been used.

numberOfRecords ()

Get the total number of records in the SRU result set. The result set may be split into several chunks.

currentNumber ()

Get the current number of records that has been passed. This is equal to or less then numberOfRecords.

resultSetId ()

Get the SRU resultSetId that has been parsed.

PRIVATE HANDLERS ^

This methods are private SAX handlers to parse the XML.

start_element

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.

end_element

SAX handler for XML end tag. On PICA+ records this calls the end handler of PICA::XMLParser.

characters

SAX handler for XML character data. On PICA+ records this calls the character data handler of PICA::XMLParser.

AUTHOR ^

Jakob Voss <jakob.voss@gbv.de>

LICENSE ^

Copyright (C) 2007-2009 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.

syntax highlighting: