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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Nested XML nodes converts to "flat"

Hi,
I am using a recently downloaded version of Talend OpenStudio on Windows 8 64Bit. I am attempting to do a "simple" XML conversion from one schema to another. I have managed to piece together the objects, created reusable Xml file schemas in the Metadata area etc. and the conversion works. 
However my source file (and target file) have nodes ("nestings") within looped the record structure, which when imported lose the nodes and just become part of the record.
So for example:
<orders>
  <order>
     <element1>xxxxx</element1>
     <element2>xxxxxx</element2>
     <attachments>
        <attachment>
           <url>xxxxxxxxxxxxxxxxx</url>
        </attachment>
     </attachments>
   </order>
</orders>
On conversion this becomes:
<neworders>
  <neworder>
     <new_element1>xxxxx</new_element1>
     <new_element2>xxxxxx</new_element2>
     <new_url>xxxxxxxxxxxxxxxxx</new_url>     <<---- node has been lost.
   </neworder>
</neworders>

So my building blocks at this time are:
tFileInputXML
tMap
tFileOutputXML
When I read in the source xml to create the input schema all appears fine, is labels all the elements, and the nested attachment are labelled with a fieldname "attachments/url"
So I expected this nesting to be maintained, but IO can;t figure out why it isn't
Sorry the the amateur question, just starting out here.
My next goal to to change ht InputFile to collect from a Web service... Any guidanc eon that would be good.
I also wan to automated the job somehow?.. Is there a way to run it from command-line/batch file/scheduled task or as a windows service?
Thanks in advance. Trevor.

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi
Please use tAdvancedFileOutputXML to generate a XML file, this component provides a GUI for you to design the XML tree structure more esaily. After you develop and test the job, you can export the job script and schedule it. Just search the relevant topics with the key 'scheduler' in forum.