cancel
Showing results for 
Search instead for 
Did you mean: 

XML output inserting CDATA

manny_papadelias
Explorer
0 Kudos

Hi

I am using PI 7.31 to retrieve some information using a SQL statement. The information in the form of XML is escaped and passed in to OM as text.

The escaping is disabled using xsl and appears as xml. When a field exceeds 150 characters in the output and viewed with pretty print it is inserting <![CDATA[ for this field.

How do I prevent this from occurring?

The xsl used to escape is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:stylesheet version="1.0" xmlns:ns0="http://www.w3.org/1999/XSL/Transform">

   <ns0:template match="*/row">

      <ns1:Messages xmlns:ns1="http://sap.com/xi/XI/SplitAndMerge">

         <ns1:Message1>

            <ns2:EngagementProjectCPCreate xmlns:ns2="urn:hydro-com-au:changepoint:project">

               <ns0:value-of select="./XML" disable-output-escaping="yes" xmlns:ns0="http://www.w3.org/1999/XSL/Transform"/>

            </ns2:EngagementProjectCPCreate>

         </ns1:Message1>

      </ns1:Messages>

   </ns0:template>

</ns0:stylesheet>

Thanks

Manny

Accepted Solutions (0)

Answers (1)

Answers (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Manny,

In test tab, when you hit "pretty print" SAP PI will insert <![CDATA[]]>. To increase readability. You can ignore it (it is cosmetic).

Please test the interface end to end. If you see <![CDATA[]]> in source XML or target XML, then please share that information with us.

manny_papadelias
Explorer
0 Kudos

Hi Raghu

End to end testing shows <![CDATA[]]> in the target XML.


I have tested with varying lengths for this particular field and always if >150 characters then <![CDATA[]]> shows for pretty print and carried through MM steps to target XML.


<![CDATA[]]>  does not appear in pretty print for field when less than 150 characters and does not show in target XML.


Regards

Manny