Skip to content

sameer17cs/largexml2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

largexml2json

Description

Command line utility to convert large xml to json line output.

Installation

Requires Node.js to run.

$ npm install largexml2json
$ npm install largexml2json -g

Use it as command line

$ cd /path/to/library
$ npm link

Building for source

For production release:

$ git clone https://github.com/sameer17cs/largexml2json
$ cd largexml2json
$ npm install

Options

  • input: String

    • mandatory
    • filepath of input xml
  • output: String

    • mandatory
    • filepath of output json
    • output as json lines
  • tagtoextract: String

    • mandatory
    • name of xml tag/nested-tag to extract as json
    • content of selected tags will be converted to json line
    • nested content are stored in json field child
  • limit: Number

    • Optional
    • max output buffer size
    • default: 10
    • For higher limit, pass --max-old-space-size args to node

Example

  • largexml2json --input ./test/sample.xml --output ./test/sample.json --tagtoextract book
  • largexml2json --input ./test/sample.xml --output ./test/sample.json --tagtoextract book --limit 100