on 08-13-2008 12:06 PM
Hi,
I have sample xml file as below.
/*
<x>
<Sample a="1" b="2" c="3">
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
</Sample>
<Sample a="1" b="2" c="3">
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
</Sample>
<Sample a="1" b="2" c="3">
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
</Sample>
</x>*/
I need to convert it to csv format file.Can anyone help me on this?
in CSV format how each row will be present and how to handle the attributes in receiver FCC and the values for attributed elements?
Thanks,
Pachika.
good
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
source structure---------------------->target structure
x--------------------------------------->y
sample------------------------------->root1
a(1)------------------------------------->attribute1
b(2)------------------------------------->attribute2
c(3)------------------------------------->attribute3
sample1(123)------------------------->element1
a(1)-------------------------------->attribute1.1
b(2)-------------------------------->attribute1.2
c(3)-------------------------------->attribute1.3
Everything specified under target are elements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pachika,
I would'nt use FCC. Instead I would use a JAVA-Mapping.
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Santhosh,
But I am unable to map the sample element value.
according to below example i am missing the value 123.
Can u suggest me how to do?
/*
<x>
<Sample a="1" b="2" c="3">
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
<sample1 a="1" b="2" c="3">123</sample1>
</Sample>
</x>
*/
Hi,
Follow below configuration at receiver end
1. Fill DocumentName, document namespace, recordset name, recordset Structure( std,*) on receiver channel
std.fieldFiexdlengths = 1,1,1
std.filedNames = a,b,c
std.filedSeparator = ,
std.endSeparator = 'nl'
ignoreRecordsetNames = 'true
check with above configuration at receiver end, it will work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I suggest you to have a mapping to first convert the attribute to the field and then use the FCC at the receiver side.
1. Design the source structure that can hold the required attributes the target structure should have only element fields.
2. Map the attribute field of the source to the element field of the target this makes all the attributes as an element in the target payload.
3. Now use the FCC to convert this payload to a flat csv file.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this.
Recordset Structure: sample,sample1
sample.fieldSeparator: ,
sample.endSeparator:'nl'
sample1.fieldSeparator:,
sample1.endSeparator:'nl'
Regards,
Prakasu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.