Skip to Content

XML output inserting CDATA

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 12, 2015 at 03:00 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.