cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT mapping deserialization

Former Member
0 Kudos

All,

we are getting a response from a system in the following structure,

<response>

<responsetext><Employee><name>john</name></Employee><Employee><name>sam</name></Employee></responsetext>

</response>

The entire XML between <responsetext> is a string value of that node. we need to get the target xml of the following structure,

<target>

<Employee>

<name>john</name>

</Employee>

<Employee>

<name>sam</name>

</Employee>

</target>

How can we do this in a XSL mapping?

Thanks for the help.

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

Use a xslt like this:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
	<xsl:template match="/response/responsetext">
		<target>
		<xsl:value-of select="." disable-output-escaping="yes"/>
		</target>
	</xsl:template>
</xsl:stylesheet>

Regards,

Henrique.

Answers (2)

Answers (2)

Former Member
0 Kudos

Used Advanced UDFs and implemented the mapping.

Former Member
0 Kudos