MT-XML Conversion

Back and forth conversion between MT messages and proprietary XML

For MT to MX (ISO 20022) standard translations please check the Prowide Integrator MT-MX Translations module.

To facilitate integration with other platforms and systems, MT format can be converted to XML. This XML format is proprietary and not part of the SWIFT standard, and basically consists of a linear translation of the hierarchical structure of blocks and fields of an MT swift message to XML.

The main entry point for this feature is the AbstractMT class (actually any of its subclasses, for example MT103) where a simple call to the xml() method will return the message content in XML.

The following example illustrates the XML format for the message headers:

    <block2 type="output">

A similar serialization is performed for user and trailer blocks.

For the message text block (block 4) two different XML formats are supported, each related to a model layer. The simpler one serializes fields as simple name-value tuples, and the enriched one serializes each field component in individual XML tags.

For example a Field13C instance in the enriched version will be splitted as:

    <component number="1">RNCTIME</component>
    <component number="2">1534</component>
    <component number="3">+</component>
    <component number="4">0000</component>

While in the compressed format this will be just:


The xml() method mentioned will return the enriched version.

Additional XML related features are contained in the ConversionService class. The analogous translation from this XML into a SWIFT message is provided there, as well the serialization into the comprised XML format.

The parser implementation can seamlessly read both plain and enriched formats.