Catman...arc_xml(3pm)

πŸ“¦
version 1.320 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Catmandu::Fix::marc_xml β€” okay so this is the fix that grabs a Catmandu MARC record and transforms it into MARCXML. Manual page Catmandu::Fix::marc_xml(3pm), straight outta the User Contributed Perl Documentation, and yes she's a Perl module page, 3pm section, we love her πŸ’…


✨ SYNOPSIS ✨

# Transforms the 'record' key into a MARCXML string
marc_xml('record')

# Transforms the XML in the 'record' key into MARC accessible data
marc_xml('record',reverse:1)

πŸ¦‹ DESCRIPTION πŸ¦‹

Convert MARC data into a MARCXML string. That's the whole vibe. Data goes in, MARCXML comes out, no cap 🫢


πŸŽ€ METHODS πŸŽ€

marc_xml(PATH,[reverse:1])

Bestie, here's the tea β˜• β€” this one takes the MARC record chillin' at PATH and transforms it into MARC XML.

But wait, there's more: if you pass the reverse option, then the XML sitting at PATH gets transformed into an internal MARC format instead. Flip it and reverse it, iconic behavior πŸ’…

Heads up tho: the MARC representation needs to be stored in the record key so it plays nice with all the other Catmandu::MARC fixes. That's not optional, that's the rules πŸŽ€

🌸 INLINE 🌸

Not me telling you this Fix can be used inline in a Perl script β€” because it absolutely can, and it eats every time ✨

use Catmandu::Fix::marc_xml as => 'marc_xml';

my $data = { record => [...] };

$data = marc_xml($data);

Look at her go 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

  • Catmandu::Fix β€” the main character, go say hi 🫢

and that's the whole page, bestie!! 🌈 this icon was lovingly served up by perl v5.38.2, dated 2024-08-03 πŸ’– mwah, go slay your MARC records, iykyk πŸŽ€βœ¨

πŸ“¦ where this page comes from