xml-c14n
Canonicalize XML documents
TLDR
View documentation for the original command
SYNOPSIS
xml-c14n [options] input.xml [output.xml]
PARAMETERS
--exc
Perform exclusive XML canonicalization (without comments).
--exc-with-comments
Perform exclusive XML canonicalization with comments.
--inc
Perform inclusive XML canonicalization (without comments).
--inc-with-comments
Perform inclusive XML canonicalization with comments.
--help
Display help message.
input.xml
The input XML file to be canonicalized.
output.xml (optional)
The output file to write the canonicalized XML to. If not specified, output to standard output.
DESCRIPTION
The `xml-c14n` command is a command-line tool used for XML canonicalization.
XML canonicalization is the process of converting an XML document into a standard, normalized form. This is crucial for applications that rely on the integrity and consistency of XML data, such as digital signatures and data comparison.
`xml-c14n` supports various canonicalization methods defined in the XML Canonicalization specifications, including exclusive and inclusive canonicalization, with or without comments.
It takes an XML file as input and outputs the canonicalized version of the document.
By providing a consistent representation of XML data, `xml-c14n` helps ensure that different systems interpret the data in the same way, regardless of minor variations in formatting or serialization.
CAVEATS
The specific canonicalization methods available and their behavior depend on the version of the `xml-c14n` tool and the underlying XML processing libraries it uses. It's important to verify the behavior and capabilities for your specific use case.
EXAMPLE
To perform exclusive XML canonicalization of `input.xml` and save the result to `output.xml`: xml-c14n --exc input.xml output.xml
PURPOSE
XML Canonicalization is most often required for creating XML signatures, for example, when communicating sensitive information via XML payloads.
SEE ALSO
xmllint(1)