<?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 Re: XML with key as static Value in tfileoutputMSXML in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370024#M133115</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, thanks for sharing. But I dont think so that will fit into my issue.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I achieve this using tfileoutputMSxml component's editor...?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 16:12:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-20T16:12:41Z</dc:date>
    <item>
      <title>XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370021#M133112</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've one input file like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID,MID,NAME&lt;BR /&gt;1,0,A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And want to convert it into xml using tfileoutputMSxml. Output should be like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;Employees&amp;gt;&lt;BR /&gt;&amp;lt;Employee key="ID"&amp;gt;1&amp;lt;/Employee&amp;gt;&lt;BR /&gt;&amp;lt;Employee key="MID"&amp;gt;0&amp;lt;/Employee&amp;gt;&lt;BR /&gt;&amp;lt;Employee key="NAME"&amp;gt;A&amp;lt;/Employee&amp;gt;&lt;BR /&gt;&amp;lt;/Employees&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am not able to set "&lt;SPAN&gt;&amp;lt;Employee key="ID"&amp;gt;1&amp;lt;/Employee&amp;gt;" kind of tags in component. Can anyone help how to set this in component&amp;nbsp;..?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 10:44:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370021#M133112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T10:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370022#M133113</link>
      <description>&lt;P&gt;Is it possible using component .................?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 12:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370022#M133113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T12:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370023#M133114</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLx0AAG"&gt;@kate&lt;/A&gt;, take a look at this thread (&lt;A href="https://community.qlik.com/s/feed/0D73p000004kEhvCAE#M16636" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/Create-an-XML-with-complex-type/m-p/51014#M16636&lt;/A&gt;). I believe the links and tips I provided should be of help to you here.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 16:05:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370023#M133114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T16:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370024#M133115</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, thanks for sharing. But I dont think so that will fit into my issue.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I achieve this using tfileoutputMSxml component's editor...?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 16:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370024#M133115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T16:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370025#M133116</link>
      <description>&lt;P&gt;It is not too different from what I pointed you towards. Here is the Talend documentation for this component (&lt;A href="https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/pi3qmrjr1dUoHVrQhYoW8Q).&amp;nbsp;You" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/pi3qmrjr1dUoHVrQhYoW8Q).&amp;nbsp;You&lt;/A&gt; will need to either click the green plus symbol to add sub-elements or attributes, or drag your input columns onto (what starts off as the "rootTag") and then add them as either attributes (for your "Key") or sub-elements. You will also need to set your loop status on your "Employees" element in the "Node Status" column.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is actually very much like the example I gave a link to.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 16:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370025#M133116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T16:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370026#M133117</link>
      <description>&lt;P&gt;Try this link.....&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/pi3qmrjr1dUoHVrQhYoW8Q).%C2%A0You?_ga=2.250164175.851872892.1519033484-1556048276.1471601365" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/pi3qmrjr1dUoHVrQhYoW8Q&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 16:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370026#M133117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T16:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370027#M133118</link>
      <description>&lt;P&gt;Can you please share one example within screen shot..? Because for creating key it gives only one static value and no any other option left to put input column value once key set as static value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 17:42:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370027#M133118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T17:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370028#M133119</link>
      <description>&lt;P&gt;Ok first of all you have to turn the dataset and provide records with key value pairs.&lt;/P&gt;&lt;P&gt;ID; 1&lt;/P&gt;&lt;P&gt;MID; 0&lt;/P&gt;&lt;P&gt;NAME; A&lt;/P&gt;&lt;P&gt;and so on....&lt;/P&gt;&lt;P&gt;If the columns are fixed - I would suggest doing that with a tMap and one normal output + 2 addition joined outputs.&lt;/P&gt;&lt;P&gt;Next: you do not need tFileOutputMSXML. The normal tFileOutputXML ist quite enough. Here you can use the internal mapper to define the XML output.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 22:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370028#M133119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T22:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370029#M133120</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKk8AAG"&gt;@lli&lt;/A&gt;'s post helped me understand where your problem is. Your issue is not with configuring the XML component, it is reshaping your data to map to your XML component. I have just knocked up a job to do this quickly. I am basing this on the fact that you stated your data looks like this.....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;ID,MID,NAME&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,0,A&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;If your data changes (to include more columns or more rows) you will need to tweak this to work. But the theory is sound. See a screenshot of my job below....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-02-20 at 22.52.57.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsfL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154759i22A656705C8C8149/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsfL.png" alt="0683p000009LsfL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;The tFixedFlowInput represents your file component. The rest will be as you need them.&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKk8AAG"&gt;@lli&lt;/A&gt;&amp;nbsp;was correct, you do not need to use the tFileOutputMSXML, but I have used it as you specifically asked to use it.&lt;BR /&gt;&lt;BR /&gt;The first tMap (tMap_1) is used to combine your data into header row and value pairs and then to join all of those pairs into one long String. This is done so that the tNormalize component can be used to turn your 1 row into 3 rows (one per column). I have included a header row in my tFixedFlowInput, you will need to read yours in from the file. The tMap looks like below....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-02-20 at 23.14.19.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrNf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141734i70F957BA564F5237/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrNf.png" alt="0683p000009LrNf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;The tMap variable code is shown below with the "Merged_Row" expression....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;ID&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;Var.ID==null ? row1.ID : Var.ID + ";" + row1.ID&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;MID&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;Var.MID==null ? row1.MID : Var.MID + ";" + row1.MID&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;Var.Name==null ? row1.Name : Var.Name + ";" + row1.Name &lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Merged_Row&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;Var.ID +","+ Var.MID +","+Var.Name &lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;The tAggregateRow is imply used to return the last row only from the tMap. This is done by NOT setting a group by value and setting the Merged_Row function to "Last". That is it.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;The tNormalize is configured by selecting the "Column to normalize" as "Merged_Row" and the separator as ",". That is all you need. The data will be converted to 3 rows (one for each column)&amp;nbsp;of key/value pairs. We split the key and value for each column in the next tMap.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-02-20 at 23.22.28.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsiY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133158iDAB2C03F2FFF3AFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsiY.png" alt="0683p000009LsiY.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;The tMap variable expressions are shown below....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Key&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;row2.Merged_Row.substring(0, row2.Merged_Row.indexOf(';')) &lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Value&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;row2.Merged_Row.substring(row2.Merged_Row.indexOf(';')+1) &lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;The data is now in 3 rows with 2 columns (key and value). As you need it. The next component is the tFileOutputMSXML. The configuration of this is shown below....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-02-20 at 23.28.14.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrVt.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137943i8F517E86C185062F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrVt.png" alt="0683p000009LrVt.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;When this is run, it produces an XML file that looks like this....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;
&amp;lt;Root&amp;gt;
&amp;lt;Employees&amp;gt;
&amp;lt;Employee key="ID"&amp;gt;1&amp;lt;/Employee&amp;gt;
&amp;lt;Employee key="MID"&amp;gt;0&amp;lt;/Employee&amp;gt;
&amp;lt;Employee key="Name"&amp;gt;A&amp;lt;/Employee&amp;gt;
&amp;lt;/Employees&amp;gt;
&amp;lt;/Root&amp;gt;

&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 23:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370029#M133120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-20T23:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370030#M133121</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLx0AAG"&gt;@kate&lt;/A&gt;, did this solve your problem?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 16:50:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370030#M133121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T16:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: XML with key as static Value in tfileoutputMSXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370031#M133122</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, thanks for sharing your logic. Yes I did solve my problem using java. I did some operation that applies on xml once its generated.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Your logic also sounds interesting.&amp;nbsp; Will try also as well and will update you how it goes.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks...! &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 16:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-with-key-as-static-Value-in-tfileoutputMSXML/m-p/2370031#M133122</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T16:59:37Z</dc:date>
    </item>
  </channel>
</rss>

