Use this extension to add an XML-Flow node to your Axway API-Builder project. With that you can convert XML-Payload you may have received from a backend stream (e.g. a SOAP-Service) into a Javascript Object for further processing or directly into a JSON-String. That allows you to easily merge data from different sources and formats into a JSON-Based-REST-API.
The Flow-Node is based on the XML-JS Library.
After have installed the XML-Node into your API-Builder project, Drag & Drop the XML-Node into your flow and select the method: XML to JSON. You get the following configuration options:
Provide the XML data should be converted into JSON using either a Selector or a plain XML-String.
Secondly you can decide if you would like to have a Javascript Object or the JSON-Payload as String.
This is not yet supported!
After creating your API Builder service (api-builder init
), you can install this plugin using npm:
npm install --no-optional @axway-api-builder-ext/api-builder-plugin-fn-xml-node
After installation start the API-Builder project and you get the following node:
- 1.0.0 - 05.12.2019
- Initial version supporting XML to JSON
- JSON to XML not yet supported
Please read Contributing.md for details on our code of conduct, and the process for submitting pull requests to us.