<?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 Converting CSV (that has single and multivalue attributes) to XML in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339997#M108076</link>
    <description>&lt;P&gt;I have a csv file that has an attribute column as shown below. The data in that column is the name of the attributes. Some of the attributes could have multiple values. I want to convert this csv into a XML file which will have multivalue tag (listing all values) for the attributes that have more than one value. I know how to convert if there is only single value for each attribute. But I am not sure how to convert the csv to xml when the attributes have single and multivalues. Could somebody please help me with this? Thanks&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Input CSV:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Attribute Name, Color&lt;/STRONG&gt;&lt;BR /&gt;aab, red&lt;BR /&gt;abc, red&lt;BR /&gt;abc, green&lt;BR /&gt;abc, blue&lt;BR /&gt;xyz, white&lt;BR /&gt;xyz, purple&lt;BR /&gt;zyx, green&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Expected Output:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Value AttributeID="aab"&amp;gt;red&amp;lt;/Value&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;MultiValue AttributeID="abc"&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;red&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;green&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;blue&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;/MultiValue&amp;gt;&lt;BR /&gt;&amp;lt;MultiValue AttributeID="xyz"&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;white&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;purple&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;/MultiValue&amp;gt;&lt;BR /&gt;&amp;lt;Value AttributeID="zyx"&amp;gt;green&amp;lt;/Value&amp;gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 09:01:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T09:01:43Z</dc:date>
    <item>
      <title>Converting CSV (that has single and multivalue attributes) to XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339997#M108076</link>
      <description>&lt;P&gt;I have a csv file that has an attribute column as shown below. The data in that column is the name of the attributes. Some of the attributes could have multiple values. I want to convert this csv into a XML file which will have multivalue tag (listing all values) for the attributes that have more than one value. I know how to convert if there is only single value for each attribute. But I am not sure how to convert the csv to xml when the attributes have single and multivalues. Could somebody please help me with this? Thanks&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Input CSV:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Attribute Name, Color&lt;/STRONG&gt;&lt;BR /&gt;aab, red&lt;BR /&gt;abc, red&lt;BR /&gt;abc, green&lt;BR /&gt;abc, blue&lt;BR /&gt;xyz, white&lt;BR /&gt;xyz, purple&lt;BR /&gt;zyx, green&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Expected Output:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Value AttributeID="aab"&amp;gt;red&amp;lt;/Value&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;MultiValue AttributeID="abc"&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;red&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;green&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;blue&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;/MultiValue&amp;gt;&lt;BR /&gt;&amp;lt;MultiValue AttributeID="xyz"&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;white&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;Value&amp;gt;purple&amp;lt;/Value&amp;gt;&lt;BR /&gt;&amp;lt;/MultiValue&amp;gt;&lt;BR /&gt;&amp;lt;Value AttributeID="zyx"&amp;gt;green&amp;lt;/Value&amp;gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339997#M108076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Converting CSV (that has single and multivalue attributes) to XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339998#M108077</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Try this with&amp;nbsp; tFileInputDelimited---&amp;gt; tFileOutputXml&amp;nbsp;&amp;nbsp;&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;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You can group the colors based on attribute name..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I got like this...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 383px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrmd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132807i860B3177C8BAF26F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrmd.png" alt="0683p000009Lrmd.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 774px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrn6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138060iED761D6E6BE62F51/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrn6.png" alt="0683p000009Lrn6.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrdI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138833iD2BC96793E07E96D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrdI.png" alt="0683p000009LrdI.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 07:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339998#M108077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T07:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting CSV (that has single and multivalue attributes) to XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339999#M108078</link>
      <description>&lt;P&gt;Hi Vignesh, thanks for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is, the output XML has to be in the following format:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value AttributeID="aab"&amp;gt;red&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;MultiValue AttributeID="abc"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value&amp;gt;red&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value&amp;gt;green&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value&amp;gt;blue&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;/MultiValue&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;MultiValue AttributeID="xyz"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value&amp;gt;white&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value&amp;gt;purple&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;/MultiValue&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;&amp;lt;Value AttributeID="zyx"&amp;gt;green&amp;lt;/Value&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Nov 2017 18:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-CSV-that-has-single-and-multivalue-attributes-to-XML/m-p/2339999#M108078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-25T18:14:35Z</dc:date>
    </item>
  </channel>
</rss>

