FIXML Converter
FIXML Converter is a library that converts FIX messages to FIXML and vice versa.
By default, the converter uses the latest published FIXML Schema from FIX Trading Community.
For example:
var converter = new FixmlConverter(ProtocolVersion.Fix50);
Message fixMessage = converter.Fixml2Fix(sourceFixmlMessage); // Converts FIXML message to FIX message
string fixmlMessage2 = converter.Fix2Fixml(fixMessage); // Converts FIX message to FIXML message
Custom FIXML Dictionaries
The FixmlConverter class has the second constructor with the schemaPath
parameter.
For FIX Protocol versions before FIX.4.4, this parameter should specify the custom FIXML DTD file path.
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 that matches the required FIX protocol version, e.g., fixml-main-5-0-SP2. This file either contains all definitions or references others definition files.
Additionally, the 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, take the following steps:
- Download the standard FIXML Schema or DTD for the required FIX Protocol version from FIX Trading Community.
- Modify the FIXML Schema/DTD.
- Create FixmlConverter class instance and specify the path to the file or folder with custom FIXML Schema/DTD in its constructor.
If you use Session-level Dictionary, you also need to pass the instance of the dictionary to the
FixmlConverter
constructor.
To add new fields or repeating groups, use custom FIXML dictionaries. If you use a custom FIX message or repeating group, then you need to add them to the converter using the following methods:
See Also
- FIXML Tutorial
- The FixmlConverter sample from the FIX Engine distribution package