1 Reply Latest reply: Mar 19, 2010 9:37 AM by Rajesh pasupula RSS

XML to CSV using AF_Modules/MessageTransformBean in AF

Mayank Gupta
Currently Being Moderated

hi All,

 

I am trying to convert an XML file to CSV using AF_Modules/MessageTransformBean  module key XML2Plain in the Communication channel.

 

http://help.sap.com/saphelp_nw04/Helpdata/EN/24/4cad3baabd4737bab64d0201bc0c6c/content.htm

 

My Structure looks like

 

<resultset>  -- 1

<row> -- 0 .. *

<line>ABC</line> -- 1

</row>

</resultset>

 

Length of line is not fixed.

 

XML2Plain  Transform.Class  com.sap.aii.messaging.adapter.Conversion

 

XML2Plain Transform.ContentType text/plain;charset=utf-8

 

XML2Plain xml.conversionType SimpleXML2Plain

 

XML2Plain xml.addHeaderLine 0

 

Now what should be value of endSeparator or field separator if length is not fixed?

 

If sample input is:

 

<resultset> 

<row>

<line>ABC</line>

</row>

<row>

<line>sapnetweaver</line>

</row>

</resultset>

 

Output should be:

 

ABC

sapnetweaver

 

Please help!

 

Thanks,

Mayank

Actions