Hero,把XML模式转换为JSON模式
Hero is a hexo-based command line tool that use xsd2json to generate json schema from xml schema files.
Prerequisite
You need to install swi-prolog
Workflow
you need to create a empty directory, and run the following command to initialize it in the created directory.
1
$ mkdir hero-test && cd hero-test $ hero init [info] Copying data [info] You are almost done! Don't forget to run `npm install` before you start!
install dependency packages
1
$ npm install npm http GET https://registry.npmjs.org/interpreted npm http GET https://registry.npmjs.org/nomnom npm http GET https://registry.npmjs.org/async ....
place your xsd files to
xsd
directory, and runhero schema
to generate json schema files injson
directory.1
$ hero schema [info] Generating json schema ... [info] Json schema models generated.