largexml2json

1.0.5 • Public • Published

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

Package Sidebar

Install

npm i largexml2json

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

9.87 kB

Total Files

7

Last publish

Collaborators

  • sameer17cs