https://github.com/runnerty/executor-parse-xml-json
An xml/json parser executor for Runnerty
https://github.com/runnerty/executor-parse-xml-json
executor json parser runnerty xml
Last synced: about 1 month ago
JSON representation
An xml/json parser executor for Runnerty
- Host: GitHub
- URL: https://github.com/runnerty/executor-parse-xml-json
- Owner: runnerty
- License: mit
- Created: 2018-02-08T07:29:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T01:35:24.000Z (about 3 years ago)
- Last Synced: 2025-08-09T21:52:35.810Z (10 months ago)
- Topics: executor, json, parser, runnerty, xml
- Language: JavaScript
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Smart Processes Management
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Dependency Status][david-badge]][david-badge-url]
# XML/JSON Parser executor for [Runnerty]:
### Installation:
Through NPM
```bash
npm i @runnerty/executor-parse-xml-json
```
You can also add modules to your project with [runnerty-cli]
```bash
npx runnerty-cli add @runnerty/executor-parse-xml-json
```
This command installs the module in your project, adds example configuration in your `config.json` and creates an example plan of use.
If you have installed [runnerty-cli] globally you can include the module with this command:
```bash
rty add @runnerty/executor-parse-xml-json
```
### Configuration sample:
```json
{
"id": "parse-xml-json_default",
"type": "@runnerty-executor-parse-xml-json"
}
```
### Plan sample:
```json
{
"id": "parse-xml-json_default",
"to": "xml",
"json": {
"title": "Hello world",
"description": "Example for XML/JSON parser executor"
}
}
```
```json
{
"id": "parse-xml-json_default",
"to": "json",
"xml": "Hello worldExample for XML/JSON parser executor"
}
```
### Plan sample using input files:
```json
{
"id": "parse-xml-json_default",
"to": "xml",
"json_file": "./test/sample.json"
}
```
```json
{
"id": "parse-xml-json_default",
"to": "json",
"xml_file": "./test/sample.xml"
}
```
### Plan sample using output file:
```json
{
"id": "parse-xml-json_default",
"to": "json",
"xml_file": "./test/sample.xml",
"output_file": "./test/output.json"
}
```
### Plan sample using options object for json:
```json
{
"id": "parse-xml-json_default",
"to": "json",
"xml_file": "./test/sample.xml",
"output_file": "./test/output.json",
"json_options": {
"attrkey": "attribute",
"charkey": "value"
}
}
```
### Plan sample using options object for xml:
```json
{
"id": "parse-xml-json_default",
"to": "xml",
"json_file": "./test/sample.json",
"output_file": "./test/output.xml",
"xml_options": {
"headless": true,
"cdata": true
}
}
```
Options definitions for `json_options` and `xml_options` params can be found here:
- [json_options]
- [xml_options]
[json_options]: https://github.com/Leonidas-from-XIV/node-xml2js#options
[xml_options]: https://github.com/Leonidas-from-XIV/node-xml2js#options-for-the-builder-class
[runnerty]: http://www.runnerty.io
[downloads-image]: https://img.shields.io/npm/dm/@runnerty/executor-parse-xml-json.svg
[npm-url]: https://www.npmjs.com/package/@runnerty/executor-parse-xml-json
[npm-image]: https://img.shields.io/npm/v/@runnerty/executor-parse-xml-json.svg
[david-badge]: https://david-dm.org/runnerty/executor-parse-xml-json.svg
[david-badge-url]: https://david-dm.org/runnerty/executor-parse-xml-json
[config.json]: http://docs.runnerty.io/config/
[plan.json]: http://docs.runnerty.io/plan/
[runnerty-cli]: https://www.npmjs.com/package/runnerty-cli