Decoding XML - Cloud - 8.0

Talend Data Fabric Studio User Guide

Version
Cloud
8.0
Language
English (United States)
EnrichDitaval
Data Fabric
Product
Talend Data Fabric
Module
Talend Studio
Content
Design and Development

About this task

In this step, you want to use a decoding mechanism to remove the escape function from the XML document before sending it to the Job.

Procedure

  1. Click the second step to display the Step Specifications area where you can define the step parameters.
    Note: You can disable the selected step in the open Process editor at any time if you select the Disable check box in the Step Specification area.
  2. From the Plugin name list, select codec.
    A description for the selected plugin is displayed in the box above the Plugin name field.
    Note: The button displays a dialog box that describes the plugin and details its parameters.
  3. Map the item_xml variable defined in the previous step to this step law_text input parameter and click the button to add them to the table.
  4. Map this step output parameter to a new variable called decode_xml, for example then click the button to add them to the table.
    Note: For each step, you can select one of the by-default variables or one of the variables defined for the preceding plugin the Process you define.
  5. In the Parameters area, complete the definition as follows:
    <parameters>
    	<method>DECODE</method>
    	<algorithm>XMLESCAPE</algorithm>
    </parameters>
    Warning: The text you enter in the text editor is indented by default upon saving. This may cause problems in certain cases such as the HTML formatting when creating a Smart View process. If required, clear the Auto-indent check box to disable the text indentation upon saving the process.

Results

So far, the first step in the Process produces the item_xml variable with the complete XML record. This step sends the item_xml to the codec plugin law_text input parameter. The codec plugin unescapes the XML and posts the result in decode_xml through its output variable. So now there is a decode_xml document ready to be sent to the last step: call the Job.