cancel
Showing results for 
Search instead for 
Did you mean: 

Change header info to ISO-8995 in XML doc.

Former Member
0 Kudos

Hello Experts,

My scenario is an inbound. Firstly I am using ABAP programming to convert the source file to XML file. While converting to the XML file im using the DOM parsing.The XML structure is as follows :

<?xml version="1.0"?>

<MT_POLL07 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../MT_POLL07.xsd">

<MessageHeader>

<File>

<Name>/tmp/classPOLL07.dos</Name>

<CreatedDate>20080204191220</CreatedDate>

<TotalRecordNo>19 </TotalRecordNo>

</File>

</MessageHeader>

The requirement is how i can change the <?xml version="1.0"?> to " <?xml version="1.0" encoding="ISO-8859-1"?>" using ABAP coding.??? SO the structure should effectively look as follows :

<?xml version="1.0" encoding="ISO-8859-1"?>

<MT_POLL07 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../MT_POLL07.xsd">

<MessageHeader>

<File>

<Name>C:/kai/perl/storemaster_home/stores/09100/inbound/POLL07.DOS</Name>

<CreatedDate>Wed Feb 7 13:09:15 2007</CreatedDate>

<TotalRecordNo>19</TotalRecordNo>

</File>

</MessageHeader>

For your reference I used the following blog to convert Flat file to XML. Please let me know ASAP. Points to be awarded sure.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

1) save the xslt code as: iso.zip file

2) open integration builder and import into "Imported Archives"

3) navigate to your Interface Mapping and add this XSL Mapping after your ABAP Mapping.

Daniel

<?xml version='1.0'?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method='xml' encoding='ISO-8859-1' />

<xsl:template match="/">

<xsl:copy-of select="*" />

</xsl:template>

</xsl:stylesheet>

Former Member
0 Kudos

The thread I referred is : /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping