Debian Codegraph @

README

raw
1 NAME
2
3 MARC::Parser::XML - Parser for MARC XML records
4
5 SYNOPSIS
6
7 use MARC::Parser::XML;
8
9 my $parser = MARC::Parser::XML->new( 't/marc.xml' );
10
11 while ( my $record = $parser->next() ) {
12 # do something ...
13 }
14
15 DESCRIPTION
16
17 MARC::Parser::XML is a lightweight, fault tolerant parser for MARC XML
18 records. Tags, indicators and subfield codes are not validated against
19 the MARC standard. The resulting data structure is optimized for usage
20 with the Catmandu data tool kit.
21
22 MARC
23
24 The MARC record is parsed into an ARRAY of ARRAYs:
25
26 $record = [
27 [ 'LDR', undef, undef, '_', '00661nam 22002538a 4500' ],
28 [ '001', undef, undef, '_', 'fol05865967 ' ],
29 ...
30 [ '245', '1', '0', 'a', 'Programming Perl /',
31 'c', 'Larry Wall, Tom Christiansen & Jon Orwant.'
32 ],
33 ...
34 ];
35
36 METHODS
37
38 new($file|$fh|$xml)
39
40 Configuration
41
42 file
43
44 Path to file with MARC XML records.
45
46 fh
47
48 Open filehandle for MARC XML records.
49
50 xml
51
52 XML string.
53
54 next()
55
56 Reads the next record from MARC input.
57
58 _decode($record)
59
60 Deserialize a raw MARC record to an ARRAY of ARRAYs.
61
62 AUTHOR
63
64 Johann Rolschewski <[email protected]>
65
66 COPYRIGHT
67
68 Copyright 2016- Johann Rolschewski
69
70 LICENSE
71
72 This library is free software; you can redistribute it and/or modify it
73 under the same terms as Perl itself.
74
75 SEE ALSO
76