cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello friends,

I have the following structure,

<root>

<nameA>

<value1>value</value1>

<value2>value</value2>

<value3>value</value3>

<nameB>

<value4>value</value4>

<value5>value</value5>

</nameB>

</nameA>

</root>

Here I need to convert this structure into a flat file. Here I am using RECEIVER FILE CONTENT CONVERSION to create a CSV file.

Can any help me in content conversion?

Thanks in advance,

-kanth.

0 Likes
View Entire Topic
bhavesh_kantilal
Active Contributor
0 Likes

You has posted the same question yesterrday in this thread, did you read through the replies?

If the answer was not clear, you can ask for clarification in the same thread so that one does not need to give you the same replies all over again.

Regards

Bhavesh

Former Member
0 Likes

Hi bhavesh,

I thought I was not very clear in my previous post.

I got replies for sender file adapter but where here its receiver file adapter in my requirement. Just want to elaborate my question I have posted it again.

Thanks,

-kanth.

bhavesh_kantilal
Active Contributor
0 Likes

Srikanth,

I was in now way discouraging you from posting questions here on SDN. What I wanted to highlight was that people had answered your question and even if you thought it was wrong / people had misunderstood your question , if you had posted it in your thread it would have been benefiical to one and all. At times using the same thread does help.

And, coming to your question, the answers are for Receiver File Adapter.

If you see the strucutre in the online help and cross comapre it with your strcuture, you will note that you are using a Nested Strcuutre. NAMEB is within NAME A .

As far i know, this strcuture is not supported and you should consider changing the datatype so that NAME B and NAME A are on the same level.

If you do this , then the content conversion will work with the parameters pointed .

Regards

Bhavesh

Former Member
0 Likes

Bhavesh,

I the output file I am able to find first field of each repetitive node.

For example,

<root>

<nameA>

<value1>value1</value1>

<value2>value2</value2>

<value3>value3</value3>

<nameB>

<value4>value14</value4>

<value5>value15</value5>

</nameB>

<nameB>

<value4>value24</value4>

<value5>value25</value5>

</nameB>

<nameB>

<value4>value34</value4>

<value5>value35</value5>

</nameB>

</nameA>

</root>

In my output file,

Value1, Value2, Value3, Value14, Value24, Value34

You have any idea on this? What could be the problem?

Thanks,

-kanth.

bhavesh_kantilal
Active Contributor
0 Likes

can you give us the content conversion parameters that created the output shouwn above?

regards

Bhavesh

Former Member
0 Likes

These are the parameters i mentioned,

Record Structure:nameA

nameA.fieldSeparator:,

nameA.endSeparator:'nl'

thanks and regards,

-kanth.

Former Member
0 Likes

Hi srikanth,

Try as below..

Recordset Name : root

Record structure : nameA,1,nameB,*

Recordsetspermessage : *

processing parameters :

ignoreRecordsetNames: true

nameA.fieldNames : give field names

nameA.fieldseparator : ,

nameB.fieldseparator : ,

OR

ignoreRecordsetNames: true

nameA.fieldNames : give field names

nameA.fieldfixedlength : give field lengths

nameB.fieldfixedlength : give field lengths

Regards

Chilla..

bhavesh_kantilal
Active Contributor
0 Likes

Chilla,

The setting you have given are for Sender File Adapter.

They are not for Receiver File Adapter.

Regards

Bhavesh

Former Member
0 Likes

Hi,

Oh thanks Bhavesh..

Try the below..

Record structure : nameA,1,nameB,*

processing parameters :

nameA.fieldseparator : ,

nameB.fieldseparator : ,

Regards

Chilla..