Hello Experts,
I want to convert the MT100 payment file received from BCM into a custom structure and send it to a third party. The MT100 file received is in terms of text file and the requirement structure from Bank is XML.
Is there anyway to directly generate a MT100 file directly in XML format? If not, then i have uphill task on my shoulders of converting the below mentioned structure into XML.
compcode
100
:20:123456789
:32A:150805SAR1000,
:50:/0107002268360010
ANB
P.O.BOX 1111,
City1- 11492
Country 1
:52A:compcode
:57A:compcode
:59:/10700500032323
Test Vendor
1-44,Test street
SA - 21485
:70:No.TEST1/5.8.2015
:20:1500000123
:32A:150805SAR3000,
:50:/0107002268360010
Bank
P.O.BOX 8524,
City- 11492
Country 2
:52A:compcode
:54A:/0107002268360010
compcode
:57A:compcode
:59:/10700500032323
Test vendor 2
SA -
:70:No.TEST3/5.8.2015
The above mentioned txt structure must be converted into the below format of XML -
<PaymentMessage>
<PaymentTransaction><SequenceNum>1234567894</SequenceNum><TransactionData>compcode 100 :20:1234567894 :32A:150805SAR1000, :50:/0107002268360010 ANB P.O.BOX 1111, City1- 11492 Country 1 :52A:compcode :57A:compcode :59:/10700500032323 Test Vendor 1-44,Test street SA - 21485 :70:No.TEST1/5.8.2015
</TransactionData>
</PaymentTransaction>
<PaymentTransaction><SequenceNum>1500000123</SequenceNum><TransactionData>:20:1500000123 :32A:150805SAR3000, :50:/0107002268360010 Bank P.O.BOX 8524, City- 11492 Country 2 :52A:compcode :54A:/0107002268360010 compcode :57A:compcode :59:/10700500032323 Test vendor 2 SA - :70:No.TEST3/5.8.2015
</TransactionData>
</PaymentTransaction>
</PaymentMessage>
I have also attached the .txt file and .xml file to the note. Please refer to it if needed.
Any help on this will be highly appreciated.
Regards,
Nitin