Page 1 of 1

Reading XML file

Posted: Mon Apr 26, 2010 5:25 am
by ankita
Hi All,

I have created a simple job to extract data from xml file and loaded it into sequential file. For e.g, if source is as below,
<Customer>
<FName>
Titi
</FName>
<LName>
Maiti
</LName>
<FName>
Arup
</FName>
<LName>
Roy
</LName>
</Customer>
Then output should be as,
Titi,Maiti
Arup,Roy

But the jobs is creating o/p as,
Titi,
Maiti
Arup,
Roy

As per my understanding, it's passing the newline as in the xml file. Though job stat shows 2 records. Can anyone please help me to format the output properly ?

Thanks in advance !
Ankita

Posted: Mon Apr 26, 2010 6:29 am
by chulett
Yes, the newline is simply part of the data when your input file is formatted like that. Strip them from the field in your job using Convert() and CHAR(13).

Posted: Tue Apr 27, 2010 11:23 pm
by ankita
Thanks chulett ! It has solved the problem.