XML input stage issue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vermas5
Participant
Posts: 2
Joined: Thu Jun 28, 2012 12:43 am

XML input stage issue

Post by vermas5 »

Hi,

I am trying to parse a XML file and write it to a text file. I am not getting the correct output.
XML file used is:-
<?xml version="1.0" encoding="UTF-8"?>
<Fields>
<Col_1>7542></Col_1>
<Col_2>Success</Col_2>
</Fields>

The output that is received in the file is:-
"<Col_1>7542</Col_1>","<Col_2>Success</Col_2>"

The correct output should be:-
"7542","Success"

This was working correctly in datastage version 8.0 but recently we migrated to 8.5 where we are facing this issue. How can I solve this?
Thanks,
Shreya V
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change the quote character in the Sequential File stage from double-quote to None.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It looks like you want the quotes? ...but don't want the tag characters (left and right caret < and > ? ....

To remove the carets, open the xmlInput Stage, go to the output link and scroll to the Descriptions of the columns on that link...make sure that each of the entries ends with "text()" for the entries that are xml elements. It sounds as though each Description is only ending with a /. ...that means "give me the whole tag, including the carets".

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
vermas5
Participant
Posts: 2
Joined: Thu Jun 28, 2012 12:43 am

Post by vermas5 »

Thanks, the issue is resolved now. "text()" property was required to be added in XML output stage Output tab for this version. It was working fine without this in 8.0.
Thanks,
Shreya V
Post Reply