xml-compiler

1.0.1 • Public • Published

xml-compiler

XML and JSON Compiler based on the documentation of JXON

npm install xml-compiler --save

Try it out

node example

API

new XMLCompiler(config)

Create a new instance of the XMLCompiler

  • config - Object based on JXON [optional]

XMLCompiler.toJSON(DocObject)

Create a new JSON file from an XML file. Returns the corresponding JSON object from the Promise.

DocObject

Property Type Description Required
docPaths Array (String) Array of paths to the target files. Yes
destDir String Path destination for the compiled files. No
jsOut Bool Optional JS file to be added with the source of the JSON file in a require statement. No

For example

{
  docPaths: ['some/path/to/file.xml'],
  destDir: 'some/output/path'
}

Readme

Keywords

none

Package Sidebar

Install

npm i xml-compiler

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • wenkesj