<?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 Creating XML with repeating elements in Data Quality</title>
    <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199508#M366</link>
    <description>Hi,
&lt;BR /&gt;I am trying to create an XML output using Delimited Input data. The output XML XSD has complex element type (repeating elements) to which I am unable to assign data.
&lt;BR /&gt;Could you please help in this regard.
&lt;BR /&gt;Sample Input
&lt;BR /&gt;11|Sam|1|200|2|400|3|600
&lt;BR /&gt;Expected Output
&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&lt;BR /&gt;&amp;lt;OrdDet&amp;gt;
&lt;BR /&gt;&amp;lt;CustID&amp;gt;11&amp;lt;/CustID&amp;gt;
&lt;BR /&gt;&amp;lt;CustName&amp;gt;Sam&amp;lt;/custName&amp;gt;
&lt;BR /&gt;&amp;lt;Orders&amp;gt;
&lt;BR /&gt; &amp;lt;SubId&amp;gt;1&amp;lt;/SubId&amp;gt;
&lt;BR /&gt; &amp;lt;Amount&amp;gt;200&amp;lt;/Amount&amp;gt;
&lt;BR /&gt;&amp;lt;/Orders&amp;gt;
&lt;BR /&gt;&amp;lt;Orders&amp;gt;
&lt;BR /&gt; &amp;lt;SubId&amp;gt;2&amp;lt;/SubId&amp;gt;
&lt;BR /&gt; &amp;lt;Amount&amp;gt;400&amp;lt;/Amount&amp;gt;
&lt;BR /&gt;&amp;lt;/Orders&amp;gt;
&lt;BR /&gt;&amp;lt;Orders&amp;gt;
&lt;BR /&gt; &amp;lt;SubId&amp;gt;3&amp;lt;/SubId&amp;gt;
&lt;BR /&gt; &amp;lt;Amount&amp;gt;600&amp;lt;/Amount&amp;gt;
&lt;BR /&gt;&amp;lt;/Orders&amp;gt;
&lt;BR /&gt;&amp;lt;/OrdDet&amp;gt;
&lt;BR /&gt;
&lt;BR /&gt;Thanks in advance.
&lt;BR /&gt;- Shankaran</description>
    <pubDate>Sat, 16 Nov 2024 13:28:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:28:36Z</dc:date>
    <item>
      <title>Creating XML with repeating elements</title>
      <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199508#M366</link>
      <description>Hi,
&lt;BR /&gt;I am trying to create an XML output using Delimited Input data. The output XML XSD has complex element type (repeating elements) to which I am unable to assign data.
&lt;BR /&gt;Could you please help in this regard.
&lt;BR /&gt;Sample Input
&lt;BR /&gt;11|Sam|1|200|2|400|3|600
&lt;BR /&gt;Expected Output
&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&lt;BR /&gt;&amp;lt;OrdDet&amp;gt;
&lt;BR /&gt;&amp;lt;CustID&amp;gt;11&amp;lt;/CustID&amp;gt;
&lt;BR /&gt;&amp;lt;CustName&amp;gt;Sam&amp;lt;/custName&amp;gt;
&lt;BR /&gt;&amp;lt;Orders&amp;gt;
&lt;BR /&gt; &amp;lt;SubId&amp;gt;1&amp;lt;/SubId&amp;gt;
&lt;BR /&gt; &amp;lt;Amount&amp;gt;200&amp;lt;/Amount&amp;gt;
&lt;BR /&gt;&amp;lt;/Orders&amp;gt;
&lt;BR /&gt;&amp;lt;Orders&amp;gt;
&lt;BR /&gt; &amp;lt;SubId&amp;gt;2&amp;lt;/SubId&amp;gt;
&lt;BR /&gt; &amp;lt;Amount&amp;gt;400&amp;lt;/Amount&amp;gt;
&lt;BR /&gt;&amp;lt;/Orders&amp;gt;
&lt;BR /&gt;&amp;lt;Orders&amp;gt;
&lt;BR /&gt; &amp;lt;SubId&amp;gt;3&amp;lt;/SubId&amp;gt;
&lt;BR /&gt; &amp;lt;Amount&amp;gt;600&amp;lt;/Amount&amp;gt;
&lt;BR /&gt;&amp;lt;/Orders&amp;gt;
&lt;BR /&gt;&amp;lt;/OrdDet&amp;gt;
&lt;BR /&gt;
&lt;BR /&gt;Thanks in advance.
&lt;BR /&gt;- Shankaran</description>
      <pubDate>Sat, 16 Nov 2024 13:28:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199508#M366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML with repeating elements</title>
      <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199509#M367</link>
      <description>Hi,&lt;BR /&gt;Could somebody help with this request. &lt;BR /&gt;Thanks in adavnce.&lt;BR /&gt;Regards&lt;BR /&gt;Shankaran</description>
      <pubDate>Wed, 07 Apr 2010 09:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199509#M367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-07T09:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML with repeating elements</title>
      <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199510#M368</link>
      <description>Hello 
&lt;BR /&gt;Here is a demo, 
&lt;BR /&gt;in.csv: 
&lt;BR /&gt; 
&lt;B&gt;&lt;BR /&gt;11|Sam|1|200|2|400|3|600&lt;BR /&gt;&lt;/B&gt; 
&lt;BR /&gt;Code on tJavaRow: 
&lt;BR /&gt; 
&lt;PRE&gt;output_row.CustID = input_row.CustID;&lt;BR /&gt;output_row.CustName = input_row.CustName;&lt;BR /&gt;output_row.conn=input_row.SubId1+","+input_row.Amount1+";"+input_row.SubId2+","+input_row.Amount2+";"+input_row.SubId3+","+input_row.Amount3;&lt;/PRE&gt; 
&lt;BR /&gt;tLogRow: 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job ddd at 20:00 07/04/2010.&lt;BR /&gt;.------+--------+-----+------.&lt;BR /&gt;|         tLogRow_1          |&lt;BR /&gt;|=-----+--------+-----+-----=|&lt;BR /&gt;|CustID|CustName|SubId|Amount|&lt;BR /&gt;|=-----+--------+-----+-----=|&lt;BR /&gt;|11    |Sam     |1    |200   |&lt;BR /&gt;|11    |Sam     |2    |400   |&lt;BR /&gt;|11    |Sam     |3    |600   |&lt;BR /&gt;'------+--------+-----+------'&lt;BR /&gt;Job ddd ended at 20:00 07/04/2010. &lt;/PRE&gt; 
&lt;BR /&gt;out.xml: 
&lt;BR /&gt; 
&lt;B&gt;&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;&lt;BR /&gt;&amp;lt;OrdDet&amp;gt;&lt;BR /&gt; &amp;lt;CustID&amp;gt;11&amp;lt;/CustID&amp;gt;&lt;BR /&gt; &amp;lt;CustName&amp;gt;Sam&amp;lt;/CustName&amp;gt;&lt;BR /&gt; &amp;lt;Orders&amp;gt;&lt;BR /&gt; &amp;lt;SubId&amp;gt;1&amp;lt;/SubId&amp;gt;&lt;BR /&gt; &amp;lt;Amount&amp;gt;200&amp;lt;/Amount&amp;gt;&lt;BR /&gt; &amp;lt;/Orders&amp;gt;&lt;BR /&gt; &amp;lt;Orders&amp;gt;&lt;BR /&gt; &amp;lt;SubId&amp;gt;2&amp;lt;/SubId&amp;gt;&lt;BR /&gt; &amp;lt;Amount&amp;gt;400&amp;lt;/Amount&amp;gt;&lt;BR /&gt; &amp;lt;/Orders&amp;gt;&lt;BR /&gt; &amp;lt;Orders&amp;gt;&lt;BR /&gt; &amp;lt;SubId&amp;gt;3&amp;lt;/SubId&amp;gt;&lt;BR /&gt; &amp;lt;Amount&amp;gt;600&amp;lt;/Amount&amp;gt;&lt;BR /&gt; &amp;lt;/Orders&amp;gt;&lt;BR /&gt;&amp;lt;/OrdDet&amp;gt;&lt;BR /&gt;&lt;/B&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 07 Apr 2010 13:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199510#M368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-07T13:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML with repeating elements</title>
      <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199511#M369</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;However I have a query on the right approach when there are numerous complex element types (number of repeating elements is dynamic).&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Output them into the same xml file one by one using the feature 'append the source xml file'. About 'append the source xml file', see 5975. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 08 Apr 2010 08:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199511#M369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-08T08:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML with repeating elements</title>
      <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199512#M370</link>
      <description>Hi Shong, 
&lt;BR /&gt;Thanks a lot for your reply. I am not sure if I posted by query correctly (or prob did not understand ''append the source xml file" feature correctly). 
&lt;BR /&gt;In the sample message posted above &amp;lt;AlternateID&amp;gt;, &amp;lt;PriceQuantityAssociation&amp;gt;, &amp;lt;Token&amp;gt;, &amp;lt;Account&amp;gt; are some of the repeating elements. The values required to populate these repeating elements will come in a single record from source (ie all the required values willbe part of column in a single message). 
&lt;BR /&gt;Going by the example job given by you earlier , to concatenate and then to normalise on the concatenated column to populate the repeating elements, my query was , 
&lt;BR /&gt;would we need to normalise data the number of times we have repeating/group elements ? 
&lt;BR /&gt;Is there a better approach / or am I missing some link here ? 
&lt;BR /&gt;Please advise. 
&lt;BR /&gt;Thanks in advance. 
&lt;BR /&gt;-Regards 
&lt;BR /&gt;Shankaran</description>
      <pubDate>Thu, 08 Apr 2010 16:19:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199512#M370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-08T16:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating XML with repeating elements</title>
      <link>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199513#M371</link>
      <description>Hi,&lt;BR /&gt;Could you please help with this request.&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;Regards&lt;BR /&gt;Shankaran</description>
      <pubDate>Mon, 12 Apr 2010 11:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Creating-XML-with-repeating-elements/m-p/2199513#M371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-12T11:30:40Z</dc:date>
    </item>
  </channel>
</rss>

