<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to transform multi level xml message to multi level JSON Output and generate a file output in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-transform-multi-level-xml-message-to-multi-level-JSON/m-p/2360604#M125153</link>
    <description>&lt;P&gt;I need to create a map between multi level xml input file and transform using map source xml format to json format and generate a multi level output json file as mentioned below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample input :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;Employees&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;lt;Employee&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ProjectName&amp;gt;ABC&amp;lt;/ProjectName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ProjectLocation&amp;gt;Bangalore&amp;lt;/ProjectLocation&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;EmpID&amp;gt;EXP001&amp;lt;/EmpID&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;EmpName&amp;gt;Kumar&amp;lt;/EmpName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/Employee&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;lt;Employee&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectName&amp;gt;XYZ&amp;lt;/ProjectName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectLocation&amp;gt;Bangalore&amp;lt;/ProjectLocation&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EmpID&amp;gt;EXP0012&amp;lt;/EmpID&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EmpName&amp;gt;Shanmugam&amp;lt;/EmpName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/Employee&amp;gt;&lt;BR /&gt;&amp;lt;/Employees&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Sample JSON output expected :&amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt;"employees": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "employee":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; [&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "firstName": "John",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "EmpID": "Doe",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "ProjectDetails":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectName": "ABC",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectLocation" : "Bangalore"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "firstName": "John",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"EmpID": "Doe",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "ProjectDetails":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectName": "ABC",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectLocation" : "Bangalore"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ]&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am finding it difficult to generate output in target multi level JSON format as tFileOutputJSON node is generating flat JSON structure only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggession on steps to generate multi level JSON file is much appreciated&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2017 11:06:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-08T11:06:32Z</dc:date>
    <item>
      <title>How to transform multi level xml message to multi level JSON Output and generate a file output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-transform-multi-level-xml-message-to-multi-level-JSON/m-p/2360604#M125153</link>
      <description>&lt;P&gt;I need to create a map between multi level xml input file and transform using map source xml format to json format and generate a multi level output json file as mentioned below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample input :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;Employees&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;lt;Employee&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ProjectName&amp;gt;ABC&amp;lt;/ProjectName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ProjectLocation&amp;gt;Bangalore&amp;lt;/ProjectLocation&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;EmpID&amp;gt;EXP001&amp;lt;/EmpID&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;EmpName&amp;gt;Kumar&amp;lt;/EmpName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/Employee&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;lt;Employee&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectName&amp;gt;XYZ&amp;lt;/ProjectName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ProjectLocation&amp;gt;Bangalore&amp;lt;/ProjectLocation&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ProjectDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EmpID&amp;gt;EXP0012&amp;lt;/EmpID&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EmpName&amp;gt;Shanmugam&amp;lt;/EmpName&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/EmployeeDetails&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/Employee&amp;gt;&lt;BR /&gt;&amp;lt;/Employees&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Sample JSON output expected :&amp;nbsp;&lt;BR /&gt;{&lt;BR /&gt;"employees": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "employee":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; [&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "firstName": "John",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "EmpID": "Doe",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "ProjectDetails":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectName": "ABC",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectLocation" : "Bangalore"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "firstName": "John",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"EmpID": "Doe",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "ProjectDetails":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectName": "ABC",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"ProjectLocation" : "Bangalore"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ]&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am finding it difficult to generate output in target multi level JSON format as tFileOutputJSON node is generating flat JSON structure only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggession on steps to generate multi level JSON file is much appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 11:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-transform-multi-level-xml-message-to-multi-level-JSON/m-p/2360604#M125153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T11:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform multi level xml message to multi level JSON Output and generate a file output</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-transform-multi-level-xml-message-to-multi-level-JSON/m-p/2360605#M125154</link>
      <description>&lt;P&gt;I managed to get it working using approach mentioned below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tFileInputJson --&amp;gt; tWriteXMLField --&amp;gt; tFileOutputRaw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note : I am using&amp;nbsp;&lt;SPAN&gt;tFileOutputRaw instead of&amp;nbsp;tFileOutputXML as i am already parsing the data in&amp;nbsp;tWriteJsonField.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any comment of better practice to improve my solution and maping the same is much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LriJ"&gt;json2xml_Order2PO_Transform9.zip&lt;/A&gt;</description>
      <pubDate>Mon, 11 Dec 2017 07:11:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-transform-multi-level-xml-message-to-multi-level-JSON/m-p/2360605#M125154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-11T07:11:52Z</dc:date>
    </item>
  </channel>
</rss>

