Page 1 of 1

XML File Generation

Posted: Tue Feb 15, 2011 10:03 am
by Thripura
Hi,
I need to create an xml output from multiple datasets.

<Body>
<Profile>
<EmpId>123</EmpId>
<Addresses>
<address>
<AddrType>Main</AddrType>
<City>ABC</City>
</address>
<address>
<AddrType>Secondary</AddrType>
<City>XYZ</City>
</address>
</Addresses>
</profile>
</Body>

Address is repeating element , I have selected AddrType as Key but I am getting two records in the xml ie., First address info in the first record and second address info in the second record.

Job Flow:

[Addr Dataset]----------->[Addr xml o/p]--->

Join the above Addr Xml output with the [Employee Datset] and generate the final xml.

Please suggest me what to do to get the correct output.

Thanks,
Thripura

Posted: Tue Feb 15, 2011 4:19 pm
by eostic
Can you explain your problem in more detail? It's not exactly clear what the issue is......

We assume that the xml you pasted is what you "want"..... please paste what you are getting that needs to be different.

Thanks.

Ernie

Xml File Generation

Posted: Tue Feb 15, 2011 11:36 pm
by Thripura
Output i am getting is below:

<Body>
<profile>
<EmpId>123</EmpId>
<Addresses>
<address>
<AddrType>Main</AddrType>
<City>ABC</City>
</address>
</Addresses>
</profile>
<profile>
<EmpId>123</EmpId>
<Addresses>
<address>
<AddrType>Secondary</AddrType>
<City>XYZ</City>
</address>
</Addresses>
</profile>
</Body>

Please let me know what to do..

Thanks,
Thripura

Re: Xml File Generation

Posted: Wed Feb 16, 2011 12:12 am
by myukassign
In the XML output stage you must have mentiond a trigger column i.e.adresstype / city or anything.

Either you can change that to an emp id... or group as whole...

are you getting these address from multiple datasets ? if that is the case, then you need to create XML chunks and join with the key column of your emp id.

Re: Xml File Generation

Posted: Wed Feb 16, 2011 12:51 am
by Thripura
Hi,

No i have not mentioned trigger column..
I get mutiple address from a dataset , from this dataset i have generated a xml output and this xml i am trying to join with the employee dataset and generate the xml with emp and address information.

If i use Table instead of dataset its working :)..any idea y is it so???

2Node config. file and no partition while creating the dataset.