Giter Site home page Giter Site logo

lmammino / x2j-cli Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 9 KB

Node.js command line script to convert xml input into json output (can be piped easily)

Home Page: https://lmammino.github.io/x2j-cli/

License: MIT License

JavaScript 100.00%
json x2j-cli xml xml-configuration json-parser json-files json-data pipe unix

x2j-cli's Introduction

x2j-cli

npm version Build Status

Node.js command line script to convert XML input into JSON output. It can be piped to a command printing XML to stdout to have it converted and pretty printed to JSON.

Example

curl -sS http://www.w3schools.com/xml/note.xml | x2j

Will print:

{
  "note": {
    "to": [
      "Tove"
    ],
    "from": [
      "Jani"
    ],
    "heading": [
      "Reminder"
    ],
    "body": [
      "Don't forget me this weekend!"
    ]
  }
}

Install

It requires Node (4.0.0 or higher) and Npm (2 or higher):

npm install --global x2j-cli

This is going to install globally the executable x2j (and its alias xml2json) which you can use to convert xml string from the standard input into formatted JSON into the standard output as shown in the example above.

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

x2j-cli's People

Contributors

lmammino avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.