on 08-17-2008 6:27 AM
Hi all,
I have to convert a XML to CSV. it shuld be fixedLength. My Structure is as follows
<root>
<NameA>
<Val1>dfjsf </Val1>
<Val2>
<Val21>ajdfjs</Val21>
<Val22>dfsdfsd</Val22>
</Val2>
<Val3>sfsfd</Val3>
</NameA>
<NameB>
<ValA>dfsdfc</ValA>
<ValB>
<ValB1>sfdsaf</ValB1>
<ValB2>sdfsf</ValB2>
</ValB>
<ValC>aedfsad</ValC>
</NameB>
</root>
the problem is i am not able to get the right record structure
i tried with
root,NameA,NameB,Val2
it gives an error
can anyone suggest me how can i do this in Adapter or XSLT Mapping is the best option?
Rgds
Aditya
Hi,
I tried with fieldSeparators and it works fine with that. But the problem is with fieldFixedLength
is it not possible with fieldFixedLength ?
rgds
aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi all,
Thnks for your answers but the problem is still not resolved
to tell you on what the o/p structure i want is as follows:
They shuld be Fixed file o/p
With
Val1 Val21 Val 22 Val3
ValA ValB1 ValB2 ValC
I tried the following record structure
NameA,Val2,NameB,ValB
Parameters
NameA.fieldFixedLengths 10,10
Val2.fieldFixedLengths 10,10
NameB.fieldFixedLengths 10,10
ValB.fieldFixedLengths 10,10
This is not working it gives null pointer exception
Rgds
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It will work for fieldFixedLengths also.
You will configure the parameters like below.
Recordset Structure:NameA,Val2,NameB,ValB
Parameters:
NameA.fieldSeparator :'nl'
Val1.fieldFixedLengths :10
Val3.fieldFixedLengths :10
Val2.fieldSeparator :,
Val21.fieldFixedLengths :10
Val22.fieldFixedLengths :10
NameB.fieldSeparator :'nl'
ValA.fieldFixedLengths :10
ValC.fieldFixedLengths :10
ValB.fieldSeparator :,
ValB1.fieldFixedLengths :10
ValB2.fieldFixedLengths :10
Regards,
Prakasu
Hi The output is as follows
dfjsf ,ajdfjs,dfsdfsd
sfsfd
dfsdfc,sfdsaf,sdfsf
aedfsad
I need it in the following format
dfjsf ajdfjs dfsdfsd sfsfd
dfsdfc sfdsaf sdfsf aedfsad
I have also added the white space
I am starting to beilve that this is not possible may be i can try to add the white space in the XML data and then may be use fieldSeparator
Please advice
Rgds
Aditya
no no... you just need to specify NameA,NameB and then for put specify your fixed lengths or field separators etc.
But the structure is as above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Can you please tell what is the output you are expecting in CSV.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can u pls tell me ur data which is coming under Name A node and Name B is same or it is different.
if the data is coming under node Name A and Name B is same then u can change ur target data type and creaste only one data type of NameA and make its occurance to 0-unbounded and ur FCC will be simple.
for example if u have 10 records then ur name A will repeate 10 times in that case no need to have name B.
Refer the below FCC.
Receiver FCC no need of Endseparator
Receiver-
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.