Hi all,
I have used an XML output stage to create an xml file from a sequential file.
The sample xml file that i used to import definition is
<CustomerInfo>
<CustomerID>0000000001</CustomerID>
<Contact>
<FirstName>Lee</FirstName>
<LastName>Chen</LastName>
<Email>LeeChen@gmail.com</Email>
</Contact>
</CustomerInfo>
My source file has 3 rows. When i run the job, i'm getting the xml file as below:
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Generated by Ascential Software Corporation, DataStage - XMLOutput stage -
- Mon May 04 16:56:22 2009
-->
<CustomerInfo>
<CustomerID>
1
</CustomerID>
<Contact>
<FirstName>
Lee
</FirstName>
<LastName>
Chen
</LastName>
<Email>
LeeChen@gmail.com
</Email>
</Contact>
</CustomerInfo>
<CustomerInfo>
<CustomerID>
2
</CustomerID>
<Contact>
<FirstName>
Joey
</FirstName>
<LastName>
Wang
</LastName>
<Email>
JoeyWang@sina.com
</Email>
</Contact>
</CustomerInfo>
<CustomerInfo>
<CustomerID>
3
</CustomerID>
<Contact>
<FirstName>
David
</FirstName>
<LastName>
Liu
</LastName>
<Email>
DavidLiu@gmail.com
</Email>
</Contact>
</CustomerInfo>
As can be seen from above xml, each row data is being enclosed between one <CustomerInfo> tag each. Because of additional tags, it throws me an error when opening the xml file.
Can I not have all the rows enclosed in a single <CustomerInfo> tag?
Please help me in this regard.
Thank you
XML Output stage
Moderators: chulett, rschirm, roy
-
kavish_shaz
- Participant
- Posts: 1
- Joined: Mon May 04, 2009 2:07 am
- Location: India
XML Output stage
Kavish
As Craig notes, that info will be very helpful. In the meantime, you can also check to see that you are using the "aggregate" option and try making one of the lower level node elements your key (such as last name).
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>

