Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT transformation in XML to ABAP: special characters issue

Former Member
0 Kudos

Hi,

I am parsing well-formed XML file that has the following data (:

<projects><project><name>Wallis &amp; 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;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

2 REPLIES 2

Former Member
0 Kudos

Hi,

Please visit the following link for reference.

http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm

Thanks & Regards,

Harish

Former Member
0 Kudos

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.