on 02-04-2008 2:11 PM
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.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.