Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
minmal xsd processing for node
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
files
.gitignore
README.md
index.js
package.json

README.md

node-xsd (zed.zed.dos)

Some tools for working with xsd's

install

npm install xsd

usage

Command line

invertxsd path/to/local.xsd

the result is json being pumped into your stdout

example

XMLSchema: in: https://github.com/tmpvar/node-xsd/blob/master/files/XMLSchema.xsd out: https://github.com/tmpvar/node-xsd/blob/master/files/XMLSchema.flattened.json

Programmatically

var xsd = require('xsd');
var fs  = require('fs');
var str = fs.readFileSync('/path/file.xsd').toString();
var json = xsd.stringToFlatJSON(str, function(errors, obj {
  // do stuff with the object.
});

// or

var json2 = xsd.fileToFlatJSON('/path/file.xsd', function(errors, obj) {

});

TODO

  • Add support for xs:import and friends
  • test coverage
Something went wrong with that request. Please try again.