1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-08 02:06:15 +02:00
tldr/pages/common/xml-canonic.md
2025-05-11 21:14:19 +03:00

658 B

xml canonic

Make XML documents canonical. More information: https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139560880.

  • Make an XML document canonical, preserving comments:

xml {{[c14n|canonic]}} {{path/to/input.xml|URI}} > {{path/to/output.xml}}

  • Make an XML document canonical, removing comments:

xml {{[c14n|canonic]}} --without-comments {{path/to/input.xml|URI}} > {{path/to/output.xml}}

  • Make XML exclusively canonical, using an XPATH from a file, preserving comments:

xml {{[c14n|canonic]}} --exc-with-comments {{path/to/input.xml|URI}} {{path/to/c14n.xpath}}

  • Display help:

xml {{[c14n|canonic]}} --help