Skip to Content
0

HCI XLST CDATA

Nov 30, 2017 at 04:21 PM

44

avatar image

Hi All,

When I write the body to a header, and I put the header variable in the XSLT, <![CDATA is created in my ouput. How can I delete this from the XML.

KR,

Massarrar

<![CDATA[ <Employer> <StartDate>2017-01-01</StartDate></Employer> ]]>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

M Assarrar Nov 30, 2017 at 07:15 PM
0

Hi Sriprasad Shivram Bhat,

First I have created an local integration flow which extract employee data. This body/data is stored in a local variable. When I go back to the head integration process, the local variable is set to an header (content modifier), and this header is used in XLST, to retrieve the body of the XML and add in the current XML.

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

http://www.w3.org/2001/XMLSchema" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" xmlns:hci=" http://sap.com/it/" exclude-result-prefixes="hci" version="2.0">

<!-- Identity transform -->

<xsl:param name="Employer"/>

<xsl:template match="@* | node()">

<xsl:copy>

<xsl:apply-templates select="@* | node()"/>

</xsl:copy> </xsl:template>

<xsl:template match="Employer">

<xsl:value-of select="$Employer"/>

</xsl:template> </xsl:stylesheet>

Output

<Employer> <Employee>

<AccountNumber>1</AccountNumber>

<EmployeeCode>1</EmployeeCode>

<ChangedBy>AdminXX</ChangedBy>

<ChangeDate>2017-08-15T07:33:20.000Z</ChangeDate>

<CountryOfBirth>USA</CountryOfBirth>

<DateOfBirth>1987-08-04</DateOfBirth>

<EmployeeCode>999999</EmployeeCode>

<ExternalEmployeeCode>1</ExternalEmployeeCode>

<PlaceOfBirth>New York</PlaceOfBirth>

<StartDateAccount>2017-08-15T07:33:20.000Z</StartDateAccount>

<![CDATA[ <Employer> <StartDate>2017-01-01</StartDate> <EndDate></EndDate> </Employer> ]]>

</Employee> </Employees>

KR,MAssarrar

Share
10 |10000 characters needed characters left characters exceeded
Sriprasad Shivaram Bhat
Nov 30, 2017 at 05:09 PM
0

Hello MD,

Could you please share your XSLT,so that we can try to help you.

Regards,

Sriprasad Shivaram Bhat

Share
10 |10000 characters needed characters left characters exceeded