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

# Catmandu::Fix::xml\_write(3pm)

serialize XML

## NAME

Catmandu::Fix::xml\_write - serialize XML

## SYNOPSIS

```
  # serialize XML structure given in field 'xml'
  xml_write(xml)
  xml_write(xml, pretty: 1)
```

## DESCRIPTION

This Catmandu::Fix serializes XML documents (given in MicroXML form as used by XML::Struct or as instance of XML::LibXML::Document). In short, this is a wrapper around XML::Struct::Writer.

## CONFIGURATION

- attributes

  Set to false to not expect attribute hashes in the XML structure.

- pretty

  Pretty-print XML if set to `1`.

- xmldecl

  - version

  - encoding

  - standalone

  ## SEE ALSO

Catmandu::Fix::xml\_read
