cancel
Showing results for 
Search instead for 
Did you mean: 

Add Line breaks in xml output file in SAP CPI

former_member277492
Participant
0 Kudos

Hello Experts,

I am working on an Integration between SF and CPI wheres the desired output file is XML.

After generating output XML file, Client is unable to process it at their end saying Line breaks are missing in the file and seeing the whole of it in one single line.

Can someone please help me how to add the Line breaks in the XML file. Receiver end it's a SFTP server.

Thanks in advance,

Best Regards,

Sree

View Entire Topic

Hi sreekar,

You could use XSLT mapping to indent the output.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output omit-xml-declaration="yes" indent="yes"/>
	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>

Hope this helps !

thanks and regards,

Praveen T

MortenWittrock
Active Contributor
0 Kudos

Agreed. I would go with the XSLT 3 identity transformation, though. It's much simpler, and XSLT 3 is supported in CPI.

Regards,

Morten