iso20022-cli
v1.0.0
Published
Convert ngx-iso-form output JSON to ISO20022 message
Downloads
10,909
Maintainers
Readme
iso20022-cli (mx)
Convert ngx-iso-form output json to MX (ISO 20022) message.
Features
- 🔥 Convert ngx-iso-form output json to MX (ISO 20022) message
- ⚡️ Supports ISO 20022 XSD Validation
How to Install
- Install npm package iso20022-cli.
Global (For CLI)
npm install -g iso20022-cli
Local (For SCRIPT/CLI)
npm install iso20022-cli
How to Use
CLI
Without XSD validation
mx <json-file-path> <targetNamespace> <output-xml-file-path>
With XSD Validation
mx <json-file-path> <targetNamespace> <xsdFileName> <output-xml-file-path>
Example
Linux
mx /mnt/c/source/xsd/camt.053.json urn:iso:std:iso:20022:tech:xsd:camt.053.001.10 /mnt/c/source/xsd/camt.053.001.10.xsd /mnt/c/source/xsd/camt.053.xml
Windows
mx camt.053.json urn:iso:std:iso:20022:tech:xsd:camt.053.001.10 camt.053.001.10.xsd camt.053.xml
Script
JavaScript
const mx = require('iso20022-cli').default;
mx.convert('./camt.053.json', 'urn:iso:std:iso:20022:tech:xsd:camt.053.001.10')
.then(output => console.log(output))
.catch(error => console.error(error));
mx.convertAndValidate('./camt.053.json', 'urn:iso:std:iso:20022:tech:xsd:camt.053.001.10','./camt.053.001.10.xsd')
.then((data) => console.log(data))
.catch((data) => console.log(data));
TypeScript
import mx from "iso20022-cli";
mx.convert('./camt.053.json', 'urn:iso:std:iso:20022:tech:xsd:camt.053.001.10')
.then(output => console.log(output))
.catch(error => console.error(error));
mx.convertAndValidate('./camt.053.json', 'urn:iso:std:iso:20022:tech:xsd:camt.053.001.10','./camt.053.001.10.xsd')
.then((data) => console.log(data))
.catch((data) => console.log(data));
NOTE: For script please install the package locally
Supported OS
- win-64x
- osx-64x
- linux-64x