Sbe Dictionary Independent Mode | Table of Content | Reducing Garbage Collection Overhead |
Using FIXML Converter |
FIXML converter is a library that converts FIX messages to FIXML and vice versa. By default, standard FIXML dictionaries are used.
FixmlConverter converter = new FixmlConverter(ProtocolVersion.FIX50); string fixmlMessage; // string that contains the source FIXML message. Message fixMessage = converter.Fixml2Fix(fixmlMessage); // Converts FIXML message to FIX message. string fixmlMessage2 = converter.Fix2Fixml(fixMessage); // Converts FIX message to FIXML message.
FixmlConverter class has the second constructor with the schemaPath parameter.
For FIX Protocol versions prior to FIX.4.4 this parameter should specify the path to the custom FIXML DTD file.
For FIX Protocol versions from FIX.4.4 and later this parameter should specify the path to the folder that contains custom FIXML Schema file(s). This folder should contain the main FIXML Schema file with the name in accordance with the used FIX protocol version, e.g. fixml-main-5-0-SP2. The file either contains all definitions itself or references (includes) to others definition files.
Additionally, FixmlConverter class has the constructor with the schemaString parameter. This constructor can be used if your application stores the custom FIXML Schema or DTD content as a plain text string.
To convert custom FIXML messages the following steps should be taken:
Custom FIXML dictionaries can be used for new tags addition or standard group using in different FIX messages. If you would use a new custom FIX message or repeating group then you need, additionally, to add it in your code by the following methods before converting: