04-26-2011 4:03 AM
Hi,
I am parsing well-formed XML file that has the following data (:
<projects><project><name>Wallis & Futuna</name></project></projects>
I use XSLT transformation:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="projects">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<PROJECTS>
<xsl:for-each select="project">
<PROJECT>
<NAME>
<xsl:value-of select="name"/>
</NAME>
</PROJECT>
</xsl:for-each>
</PROJECTS>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
If I use the above example without &amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
Any words of wisdom?
Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
Edited by: Alexei Isaev on Apr 26, 2011 5:05 AM
04-26-2011 5:33 AM
Hi,
Please visit the following link for reference.
http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
Thanks & Regards,
Harish
04-26-2011 5:39 AM
Actually, turned out that the problem was in the declaration of ABAP field where I was putting NAME - it was decrared to be shorte than the value coming in XML file. I replaced it to be a STRING, and problem disappeared.