Smart Processes Management
XML/JSON Parser executor for Runnerty:
Through NPM
npm i @runnerty/executor-parse-xml-json
You can also add modules to your project with runnerty-cli
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:
rty add @runnerty/executor-parse-xml-json
{
"id": "parse-xml-json_default",
"type": "@runnerty-executor-parse-xml-json"
}
{
"id": "parse-xml-json_default",
"to": "xml",
"json": {
"title": "Hello world",
"description": "Example for XML/JSON parser executor"
}
}
{
"id": "parse-xml-json_default",
"to": "json",
"xml": "<?xml version='1.0' encoding='UTF-8' standalone='yes'?><root><title>Hello world</title><description>Example for XML/JSON parser executor</description></root>"
}
{
"id": "parse-xml-json_default",
"to": "xml",
"json_file": "./test/sample.json"
}
{
"id": "parse-xml-json_default",
"to": "json",
"xml_file": "./test/sample.xml"
}
{
"id": "parse-xml-json_default",
"to": "json",
"xml_file": "./test/sample.xml",
"output_file": "./test/output.json"
}
{
"id": "parse-xml-json_default",
"to": "json",
"xml_file": "./test/sample.xml",
"output_file": "./test/output.json",
"json_options": {
"attrkey": "attribute",
"charkey": "value"
}
}
{
"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: