codegear / xml2json
Command-line tool to conver XML to JSON
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Type:tool
pkg:composer/codegear/xml2json
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2025-12-11 17:34:39 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>