LinuxCommandLibrary

xml-format

Pretty-print XML documents

TLDR

Format XML file

$ xml format [input.xml]
copy
Format with indentation
$ xml format --indent-spaces [4] [input.xml]
copy
Format to output file
$ xml format [input.xml] > [output.xml]
copy

SYNOPSIS

xml format [options] [file]

DESCRIPTION

xml format pretty-prints XML documents. Part of xmlstarlet toolkit. Reformats XML with proper indentation and line breaks for readability.

PARAMETERS

--indent string

Indentation string.
--indent-spaces n
Indent with n spaces.
--indent-tab
Indent with tabs.
--omit-decl
Omit XML declaration.
--dropdtd
Remove DTD.
--recover
Try to recover malformed XML.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community