Page 1 of 1

output from XML Input

Posted: Mon Feb 13, 2006 6:14 am
by kalpna
Hi! folks
my output from 'xml input' seems repeating.
i mean, the first row is repeating itself in all the rows.
the only diffrence i can c is, only the 'repetition element' seems to be the correct value, all the other feilds are values from first row.

I'm sure this is just something basic i'm missing, but i don't have anyone else here to get a fresh pair of eyes on it.

Thanx
kalpna

Posted: Mon Feb 13, 2006 8:01 am
by chulett
Assuming you imported the metadata so you are using the generated xpath expressions, it's usually becuase you've marked the wrong field as the key. Try moving it down to the lowest repeating element and see if that fixes it.

Posted: Mon Feb 13, 2006 8:49 am
by kalpna
Hi! chulett
Thanks for the reply.

I have tried changing the repetition element. but, it behaves the same way..
i mean, whatever the feild i take as a repetition element, those values seems to be ok. but, the other feilds are values from the first row.

one more thing is my xml document is like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <messageListFromWcs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WcsToHost.xsd">
<datetime>2006-02-01T22:07:21</datetime>
<sequenceNo>00000631</sequenceNo>
- <stockBalance>
<extractDate>2006-02-01</extractDate>
<extractTime>22:07:21</extractTime>
<dcLocation>D985</dcLocation>
-------------------------------------------
<bnqCode>26540320</bnqCode>
<ean>0000003205631</ean>
<stockPacks>000000990</stockPacks>
<packSize>0000002</packSize>
<units>000001980</units>
-----------------------------------------------
<bnqCode>26540399</bnqCode>
<ean>0000003205648</ean>
<stockPacks>000002060</stockPacks>
<packSize>0000001</packSize>
<units>000002060</units>
---------------------------------------------
<bnqCode>26540665</bnqCode>
<ean>0000003205686</ean>
<stockPacks>000000585</stockPacks>
<packSize>0000001</packSize>
<units>000000585</units> ................

whch don't have opening and closing tags for different records..
The dotted blocks are repititions(records)

can you please, tell me 'whether datastage accepts this type of format'???
it is successfully validated.




Thanks....a lot
kalpna