iso20022-cli (mx)

'iso20022-cli' a command-line tool and Node library designed to generate and validate ISO 20022 XML messages effortlessly. By using the output JSON from ngx-iso-form along with a few additional parameters, this tool quickly generates accurate ISO 20022 messages, simplifying the entire creation and validation process. Whether you're working with payments, securities, or trade messages, iso20022-cli ensures a smooth and efficient workflow for handling ISO 20022 data.

Features

  • Convert ngx-iso-form output json to MX (ISO 20022) message
  • Supports ISO 20022 XSD Validation

How to consume

npm install -g iso20022-cli
npm install iso20022-cli

How to use without XSD validation (CLI)

                        
                            mx <json-file-path> <targetNamespace> <output-xml-file-path>  
                        
                    

How to use with XSD validation (CLI)

                        
                            mx <json-file-path> <targetNamespace> <xsdFileName> <output-xml-file-path>  

                            //Example
                            mx ./pacs.008.json urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10 ./pacs.008.001.10.xsd ./pacs.008.xml
                        
                    
How to Use (JavaScript)
                        
                            const mx = require('iso20022-cli').default;

                            mx.convert('./pacs.008.json', 'urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10')
                            .then(output => console.log(output))
                            .catch(error => console.error(error));

                            mx.convertAndValidate('./pacs.008.json', 'urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10','./pacs.008.001.10.xsd')
                                .then((data) => console.log(data))
                                .catch((data) => console.log(data));
                        
                    
How to Use (TypeScript)
                        
                            import mx from "iso20022-cli";

                            mx.convert('./pacs.008.json', 'urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10')
                            .then(output => console.log(output))
                            .catch(error => console.error(error));

                            mx.convertAndValidate('./pacs.008.json', 'urn:iso:std:iso:20022:tech:xsd:pacs.008.001.10','./pacs.008.001.10.xsd')
                                .then((data) => console.log(data))
                                .catch((data) => console.log(data));