cancel
Showing results for 
Search instead for 
Did you mean: 

Converting an XML file to a flat text file

Former Member
0 Kudos

Dear Experts,

I have a requirement to convert an XML file to a flat file(text file) in a particular scenario. I am using the MessageTransfrom bean for this particular purpose. However, since this text file should not have any special characters, I am not able to create it due to the fact that the 'xml.fieldSeparator' attribute is mandatory for the MessageTransform bean.

I am also not able to use the 'xml.fieldFixedLengths' attribute because the input file has many blank spaces which must be displayed in the output file as they are. This is causing the channel to throw an error.

Since both the above mentioned attributes are mandatory for the MessageTransform bean, I have not been able to come up with a solution for this problem till now.

Is there any method to work around these two attributes?

Kindly provide any information that might be helpful to my situation.

Regards,

Pritish

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

For this integration you would need an outbound communication channel for file adapter without content conversión.

The XML structure should be equal that the structure defined in the middleware.

Finally the inbound communication channel with content conversión. In this case you can have field separator,length or both of them. You would be able to handle a plain structure of hierarchical structure with different levels.

Kr

Former Member
0 Kudos

Hi,

Can you share an example for conversion?.