cross format converter for any of XML, YAML/YML, JSON and INI formats.
XML/SAX/ParserDetails.ini
is required (this example was found within XML::SAX
itself):
[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1
http://xml.org/sax/features/validation = 0
NAME
xc - cross format converter for any of XML, YAML, JSON and INI formats.
SYNOPSIS
xc -f FORMAT -t FORMAT [OPTIONS]
xc -r FORMAT -w FORMAT [OPTIONS]
xc --from=FORMAT --to=FORMAT [OPTIONS]
DESCRIPTION
xc is a naive command line tool to convert data between XML, YAML, JSON
and INI formats.
OPTIONS
-h, --help
Outputs this help page.
-r FORMAT, -f FORMAT, --from=FORMAT
The mandatory option assumes the input file has the specified
format.
-w FORMAT, -t FORMAT, --to=FORMAT
The mandatory option assumes the output file has the specified
format.
--sort
Sort output (XML and JSON only).
--pretty
Beautify the output.
--skip-empty
Skip empty fields when parsing and displaying XML.
--raw
Make JSON parsing more permissive (enable an end-comma after a last
item; shell-style comments and C-style comments; allow bare keys and
single quotes).
--xml-decl[=DECL]
Output XML declaration.
--default=SECTION
Specifies a section for INI files to be used for default values for
parameters outside a section.
FORMATS
The following formats are supported:
INI
JSON
XML
YAML (YML is allowed as shortcut)
SEE ALSO
JSON, JSON::XS, JSON::PP
YAML::Tiny
XML::Simple
Config::IniFiles
COPYRIGHT
Copyright 2017, 2020, 2021 Ildar Shaimordanov
<ildar.shaimordanov@gmail.com>
MIT