Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This task transforms a JSON object or array into XML

Image Added

Transform JSON Object/Array to XML String

Description

Contains a description of the task, enter the reason for its existence here.

JSON key: description
Default value: Blank

Input

Enter the input to encode or decode here - see Scripts and Macros for details on how to specify macro content.

JSON key: input
Default value: None

Name of XML root attribute

Enter the name to give the XML root element.

JSON key: root.attribute.name
Default value: None

Request attribute name

Name of request attribute to store encoded/decoded value within. This request attribute is stored within the context for the currently executing request.

JSON key: target.attribute.name
Default: None

JSON Configuration

Below is a set of example configuration.

Code Block
languagejs
{
  "input": "{\n\"Hello\": \"world\",\n\"Answer\": 42\n}",
  "target.attribute.name": "xmloutput",
  "root.attribute.name": "root",
  "description": "Converts XML into JSON",
  "class": "io.ceptor.pipeline.tasks.TransformJsonToXmlTask"
}