XML Plus icon

XML Plus

Convert data to and from XML (community node)

JSON to XML

AI-generated

Overview

This node converts JSON data into XML format. It is useful when you need to transform structured JSON data into XML for integration with systems that require XML input, such as legacy applications, APIs, or data exchange formats. For example, you can convert a JSON object representing a purchase order into an XML document to send to a supplier's system.

Use Case Examples

  1. Converting a JSON payload from a webhook into XML to send to an external API.
  2. Transforming JSON configuration data into XML format for legacy system compatibility.

Properties

Name Meaning
Use Entire JSON Whether to use the full incoming JSON data for conversion instead of a specific input property.
Input Property The name of the JSON property to convert to XML. Ignored if 'Use Entire JSON' is true.
Output Property The name of the property where the resulting XML string will be stored.
Format XML Whether the output XML should be formatted with indentation and newlines or output as a single line.
Parser Options Options to customize how JSON is parsed and converted to XML, such as attribute prefixes, CDATA handling, comment recognition, and XML declaration settings.

Output

JSON

  • outputProperty - The XML string resulting from the conversion of the input JSON data.

Troubleshooting

  • If the specified input property does not exist in the JSON, the node throws an error indicating the missing property.
  • If XML validation is enabled and the generated XML is invalid, an error with details about the invalid XML is thrown.
  • Ensure that the input JSON structure is compatible with the XML conversion options to avoid unexpected output.

Discussion