Page 1 of 1

Placing different XML contexts in a single row

Posted: Thu Aug 07, 2008 5:19 am
by suneyes
Hi all,

I am working on XML input stage where I am facing problem with XML contexts.

I am having a context like this

<tId>
<trId context="SUN/trId/0"> 59876543</trId>
<trId context="SUN/transId/0">12345678</trId>
<trId context="QUN/tradeId/0">1546382</trId>
</tId>

when I am selecting the columns for the XML input stage,I had selected both context and text of tId.

Now my requirement is to keep all the texts(59876543,12345678,1546382)
in a single row of a file.
There are some 1450 tId tags in my input XML file.
when I am redirecting the output from 'XML input' stage to a sequential firl,
I am getting 4350 columns.(1450*3).
This is because the system is creating a column for each context.
But I want all the 3 contexts in one row.


Any help regarding my problem is highly appreciated.

_________________

Posted: Thu Aug 07, 2008 5:57 am
by throbinson
I believe you are breaking on trId. TrId is your key column and your repetitive element. This would explain the 4350 rows.
Define a key column with .../tId as the description. this makes the column the repetitive element. This will break once per tId and put all the TrIDs within a tId in a single line.

Posted: Thu Aug 07, 2008 7:07 am
by chulett
And make sure you "Aggregate all rows".

Posted: Thu Aug 07, 2008 7:47 am
by throbinson
Aggregate all rows on the XML Input stage? Where?

Posted: Thu Aug 07, 2008 7:57 am
by chulett
XML Input? D'oh. Thought we was talking output. :oops:

Posted: Fri Aug 08, 2008 2:23 am
by suneyes
Thank you very much Mr. Robinson.
your inputs helped me in resolving my issue.
Thank you very much.

And thanks to you hulett.Thanks for your active participation