Help with XMLOutput Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Even after reading your resply i cudnt figure out what is the error?

xpath statement ???

can you give an example?

for example
i have
col1 col2
123 abc

how to define xpath for col1 and col2?

thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Split from this post, if anyone is wondering who the "you" and "your" that is being referred to is.

viewtopic.php?p=392214

Nagaraj - Please explain your issue and job design and we'll see what we can do to get your particular issue solved. Also please edit your post to add your particulars - Job type, O/S, version.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcho69
Participant
Posts: 28
Joined: Wed Jan 19, 2011 8:58 am

Post by kcho69 »

Dear Nagaraj:

Suppose you need to create a xml document like this:

<MyXML>
<MyColumns>
<col1>123</col1>
<col2>abc</abc>
</MyColumns>
</MyXML>

You must use xpath statements to indicate to corresponding stage (e.g: XMLOutput or XMLWriter) how this columns are arranged, so in this example you should set:

name type length description
col1 integer 10 /MyXML/MyColumns/col1
col2 varchar 255 /MyXML/MyColumns/col2


In case you use XMLWriter, you must omit specified the root element (MyXML in this case) since this value must be set in the properties of the stage.


Regards
Diego
Post Reply