Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to map a non loop element to a loop element in tXMLMap

Hi,

I post link to the question also here because it has not been answered. 
[topic]30785[/topic]

Regards,

Teemu

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi Teemu,

Could you please elaborate your case with an example with input and expected output values?

Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,

My case is somewhat similar to Padmaraj's in the linked post. In my case input is database records with separate address fields for home and business and output should be looping address types in xml format.

Input fields are something like:

Home address line 1
Home address line 2 
Business address line 1
Business address line 2

In the target xsd schema there is a looping Address element. Output should be like:

                <Address Type="Home">
                     <Line1>Line 1</Line1>
                     <Line2>Line 2</Line2>
                 </Address>
                <Address Type="Business">
                     <Line1>Line 1</Line1>
                     <Line2>Line 2</Line2>
                 </Address>

I don't know how to achieve this with tXMLMap. 

-Teemu
Anonymous
Not applicable
Author

Any ideas how to solve this?

-Teemu
Anonymous
Not applicable
Author

Hi
You are able to generate the XML file in the below format with tAdvancedFileOutputXML component.
    <address type="home">
      <line>line1</line>
      <line>line2</line>
    </address>
    <address type="business">
      <line>line1</line>
      <line>line2</line>
    </address>
Set address as a group element, and set line as a loop element, see
0683p000009MGb5.png
Best regards
Shong
Anonymous
Not applicable
Author

Thanks Shong! Actually my need is to create web service request so is the solution applicable for it?

-Teemu