cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting the xml in sap cpi

vineetha12
Participant
0 Kudos
1,934

Hi Everyone,

In sap cpi, I get XML as an output which is printed in a single line as below.

But I want the XML in the below format

Below are the attachments of XML response and required formats.

Could you please provide a solution for it ?

Thanks,

Vineetha

achievementsresponse.txtachievmentsrequiredformat.txt

View Entire Topic
YuvrajKarwar
Explorer
0 Kudos

Hello Vineetha,

Use below XSLT after first XML and see if this is helpful to you.

<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>
vineetha12
Participant
0 Kudos

Hi Yuvraj,

Its working. Thanks for the response.