Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorol/marc-parser-xml
Parser for MARC XML records
https://github.com/jorol/marc-parser-xml
code4lib
Last synced: 9 days ago
JSON representation
Parser for MARC XML records
- Host: GitHub
- URL: https://github.com/jorol/marc-parser-xml
- Owner: jorol
- License: other
- Created: 2016-01-29T11:38:00.000Z (almost 9 years ago)
- Default Branch: devel
- Last Pushed: 2018-02-14T16:49:14.000Z (over 6 years ago)
- Last Synced: 2024-10-15T13:18:36.238Z (24 days ago)
- Topics: code4lib
- Language: Perl
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
MARC::Parser::XML - Parser for MARC XML records
[![Build Status](https://travis-ci.org/jorol/MARC-Parser-XML.png)](https://travis-ci.org/jorol/MARC-Parser-XML)
[![Coverage Status](https://coveralls.io/repos/github/jorol/MARC-Parser-XML/badge.png?branch=devel)](https://coveralls.io/github/jorol/MARC-Parser-XML?branch=devel)
[![Kwalitee Score](http://cpants.cpanauthors.org/dist/MARC-Parser-XML.png)](http://cpants.cpanauthors.org/dist/MARC-Parser-XML)# SYNOPSIS
use MARC::Parser::XML;
my $parser = MARC::Parser::XML->new( 't/marc.xml' );
while ( my $record = $parser->next() ) {
# do something ...
}# DESCRIPTION
MARC::Parser::XML is a lightweight, fault tolerant parser for MARC XML records. Tags, indicators and subfield codes are not validated against the MARC standard. The resulting data structure is optimized for usage with the Catmandu data tool kit.
# MARC
The MARC record is parsed into an ARRAY of ARRAYs:
$record = [
[ 'LDR', undef, undef, '_', '00661nam 22002538a 4500' ],
[ '001', undef, undef, '_', 'fol05865967 ' ],
...
[ '245', '1', '0', 'a', 'Programming Perl /',
'c', 'Larry Wall, Tom Christiansen & Jon Orwant.'
],
...
];# METHODS
## new($file|$fh|$xml)
### Configuration
- `file`
Path to file with MARC XML records.
- `fh`
Open filehandle for MARC XML records.
- `xml`
XML string.
## next()
Reads the next record from MARC input.
## \_decode($record)
Deserialize a raw MARC record to an ARRAY of ARRAYs.
# AUTHOR
Johann Rolschewski
# COPYRIGHT
Copyright 2016- Johann Rolschewski
# LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.# SEE ALSO