Page 1 of 1

XML output Stage

Posted: Tue May 19, 2009 7:44 am
by swathi Singamareddygari
Hi All,

I am facing the problem with the XML output stage.

My i/p:

rowid|result
1|abc
1|xdf
3|asd

I am using rowid as a trigger column.

So for rowid 1 the corresopnding result values abc,xdf should come under a single rowid chunk

means i want the output xml like this

<DMSMessage>
<sourceSystemEventId>1</sourceSystemEventId>
<retryCount>abc</retryCount>
<retryCount>xdf</retryCount>
</DMSMessage>


but for i am getting like this

<DMSMessage>
<sourceSystemEventId>1</sourceSystemEventId>
<retryCount>abc</retryCount>
</DMSMessage>
<DMSMessage>
<sourceSystemEventId>1</sourceSystemEventId>
<retryCount>xdf</retryCount>
</DMSMessage>

To achive this do we need to set any thing in the XML output stage

can any knows please help me

Thanks for your help

Posted: Tue May 19, 2009 7:56 am
by chulett
What settings are you using in the stage? Is your 'result' column marked as a key? :?

Posted: Tue May 19, 2009 8:15 am
by swathi Singamareddygari
Hi Chuleet,

I am not using result as a key column,and i am using rowid as a trigger column.

In the transformation setting i enabled Replace NULLS with empty values,single tag for empty element style apart from this i ddin't enabled any thing.

Thanks for your help

Posted: Tue May 19, 2009 9:39 am
by chulett
The 'trigger column' option tells it to create a new output file every time that value changes. Do you have an output link from the stage somewhere or is the stage writing to an output file directly? :?

Posted: Tue May 19, 2009 8:11 pm
by eostic
Try wrapping the retrycount elements in a complex or "container" type of element. Add this to your xpath for the second column (make sure you match the correct spelling..):

/DMSMesage/...EventID/AllRetryCounts/RetryCount/text()

If that works, it will help tell us exactly what is happening....it also might be the easiest solution...you can zap out the extra element downstream.

If you actually only have one column, then it might just be easier to manually build the second column's xml string in an upstream transformer and pass it along and insert it.

(take a look at the xml best practices document that is described in many places in the forum)


Ernie