I need a small program in java that transforms a Financial SWIFT message to Xml format.
You don't need to understand the details of the Financial SWIFT format; I will explain to you the things that you need.
First, for now, we need to care about the block 4, which is where the actual message is.
The message contains a list of fields:
:45X:blabla
means it's the field 45X and its value is blabla.
:34:ouf
neee
means its field 34 with value = oufneee.
As you can see, some fields can have multi-line values.
Now, fields can be put inside Sequences (for organization purposes).
There are 2 ways to define a sequence.
#1:
Use the special fields 16R(start of sequence) and 16S(end of sequence) to delimit a sequence.
For example:
:16R:FIA
:22f:xxxx
:34B:errrr
:16S:FIA
defines a sequence named FIA, with 2 fields 22f and 34B.
Please note that a sequence can contain other sub-sequences.
The name of the sequence enables identifying when a sequence starts and ends.(Check in the examples for more complete examples).
#2
If you use the :15 Letter field, this means you have a new sequence that is starting, named after the Letter and that ends at the next sequence :15 another Letter or end of message.
The output message should be something like.
33d
233
FIA
...
About the recuiterMember since Mar 14, 2020 Rahul Bohra
from Ma’an, Jordan