---
name: "Catmandu::Fix::marc_xml"
section: "3pm"
platform: "linux"
package: "libcatmandu-marc-perl"
version: "1.320-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::marc_xml"
---

# Catmandu::Fix::marc\_xml(3pm)

transform a Catmandu MARC record into MARCXML

## NAME

Catmandu::Fix::marc\_xml - transform a Catmandu MARC record into MARCXML

## 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

## METHODS

### marc\_xml(PATH,\[reverse:1\])

Transform the MARC record found at PATH to MARC XML. If an `"reverse"` option is given, then XML found at `"PATH"` will be transformed into an internal MARC format. The MARC representation needs to be stored in the `"record"` key to be used with other Catmandu::MARC fixes.

## INLINE

This Fix can be used inline in a Perl script:

```
    use Catmandu::Fix::marc_xml as => 'marc_xml';
    my $data = { record => [...] };
    $data = marc_xml($data);
```

## SEE ALSO

Catmandu::Fix
