codegear / xml2json
Command-line tool to conver XML to JSON
1.0.0
2019-01-29 00:00 UTC
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2025-04-11 16:06:42 UTC
README
Command-line tool to convert XML to JSON
Requirements
PHP needs to be a minimum version of PHP 7.0.0.
Installation
Globally by using Composer:
$ composer global require codegear/xml2json
Usage
In Command-Line
Convert XML format data in file data.xml
and output to screen:
$ xml2json data.xml
Convert XML format data in file data.xml
and save to JSON file data.json
:
$ xml2json data.xml > data.json
In VIM
Format current file:
:%!xml2json %
or add a keymap in vimrc
:
nnoremap <Leader>xj :%!xml2json %<CR>