JSON to XML

This step allows you to convert schema column containing JSON to the XML format and recorded it into the schema. JSON to XML step can be used in cases when different file formats are utilized in web applications throughout the system to synchronize those files. The step uses XML Validation and XSL Transformation to ensure the reliability of conversion.

To configure the JSON to XML manipulate step, follow the instructions below:

  1. In the Admin Navigation tree, select Interfaces > InterfaceName > Tasks > TaskName > Steps.
  2. On the toolbar, click New > New Manipulate Step.

Creating a New Manipulate Step

  1. Navigate to the JSON section and select Json to Xml.

JSON Section

  1. In the Json to Xml work area, fill in the following fields:

Basic Fields Configuration

The following table describes the fields available for this step:

Fields Description
Name Provide a distinctive name for this step.
Is Active Select the check box to engage the scheduler for this step.
Order of Execution Enter the order in which this step should be executed.
Filter Expression Optional. Use this filed to filter data from the source database prior to inserting it into the Schema table.
Sort Expression Optional. Use this field to sort data from the source database prior to inserting it into the Schema table.
Stop interface execution if query failed Optional. If enabled, the system will stop any data manipulation if the query returns an error.
Save Schema (enabled per interface) If selected, the schema is created for this step.
Audit notes If necessary, add a note to be recorded into the audit trail in the system. It can be a comment to explain your actions with this step to guide others or to distinguish this step in the audit log.
JSON schema column From the dropdown menu, select a schema column containing the converted JSON.
XML target schema column Select the schema column, into which the converted data will be recorded.
Create root element If you need to create a separate element in the schema, into which the resulting data will be transferred.
XML validation If necessary, select the XML validation type. See more on XML validation further in this document.
Validation template If you have a specific validation template for the resulting XML file, paste it into the text area below.
Encoding If necessary, select the encoding system for the resulting XML file.
XSL Transformation Check this box to enable the XSL transformation. See more details about the XSL transformation process further in this document.
XSL Template If you have a template to specify the transformation process, paste it into the text area below or upload the XSL template file by pressing the button below the text area.
  1. Click the Save button after you are done.

XML Validation

XML validation is a crucial process when converting JSON to XML. XML validation ensures that the resulting XML adheres to a predefined schema. The validation verifies the structure, data types, and content of the XML document. It helps identify and flag any errors, inconsistencies, or missing elements that may occur during the conversion process. By validating XML, users can ensure the integrity and correctness of the converted data, enabling smooth data integration and seamless communication between systems.

In iConduct, there are five options for XML validation available from the dropdown menu:

  • None. Select if you prefer to skip the XML validation in this step.
  • Auto. Select for the system to define the type of validation based on the template you paste into the Validation template field.
  • DTD. Document Type Definition is a widely used XML validation method. It defines the structure and constraints of an XML document using a separate DTD file. The DTD specifies the elements, attributes, and their relationships within the XML document. During validation, the XML parser compares the document against the DTD rules, ensuring that the XML follows the defined structure. DTD validation is straightforward and efficient but lacks certain advanced features.
  • XDR. XDR is an alternative XML validation method that uses XML-Data Reduced schemas. XDR schemas define the structure, data types, and constraints of an XML document within the document itself. XDR schemas allow more precise control over data validation compared to DTDs. The XML parser verifies the document against the XDR schema to ensure compliance. XDR validation offers greater flexibility and extensibility but may require more complex handling due to the embedded nature of the schema.
  • Schema. Select for the validation to undergo based on the task schema.

 

An XML validation template is a predefined configuration or blueprint for XML validation processes. It may contain such elements as XML schema or data type definition, validation rules, error handling, validation options, and other configuration components.

XSL Transformation

XSL (eXtensible Stylesheet Language) transformation is a technique used to convert JSON data into XML format. This process involves applying an XSLT (XSL Transformations) stylesheet to the JSON input to define how the conversion should take place.

An XSLT template is an element that can be used to specify transformation configuration. It may contain match patterns, transformation instructions, control structures, output generation, etc.