/
How to create FIXML message with repeating groups using XSLT
How to create FIXML message with repeating groups using XSLT
Example 1:
XML repeating group tags contain set of values. XSLT scripts will sort them into standart FIXML repeating group.
Input | XSLT script | Output |
---|---|---|
<?xml version="1.0" encoding="utf-8"?> <FIXTradeStifel> <UpdateReasonsCount>3</UpdateReasonsCount> <UpdateReasons> <anyType>Price</anyType> <anyType>Principal</anyType> <anyType>Net</anyType> </UpdateReasons> <UpdateValues> <anyType>10.00</anyType> <anyType>10000.00</anyType> <anyType>10000.00</anyType> </UpdateValues> </FIXTradeStifel>
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/"> <FIXMessage> <g6041> <xsl:attribute name="v"> <xsl:value-of select="/FIXTradeStifel/UpdateReasonsCount"/> </xsl:attribute> <xsl:for-each select="/FIXTradeStifel/UpdateReasons/anyType"> <xsl:variable name="Position" select="position()"/> <e> <f6042><xsl:value-of select="."/></f6042> <f6043><xsl:value-of select="/FIXTradeStifel/UpdateValues/anyType[$Position]"/></f6043> </e> </xsl:for-each> </g6041> </FIXMessage> </xsl:template> </xsl:stylesheet> | <?xml version="1.0" encoding="UTF-8"?> <FIXMessage> <g6041 v="3"> <e> <f6042>Price</f6042> <f6043>10.00</f6043> </e> <e> <f6042>Principal</f6042> <f6043>10000.00</f6043> </e> <e> <f6042>Net</f6042> <f6043>10000.00</f6043> </e> </g6041> </FIXMessage> |
, multiple selections available,
Related content
How to work with repeating groups in FixEdge
How to work with repeating groups in FixEdge
More like this
How to work with Repeating Groups
How to work with Repeating Groups
More like this
How to process FIX messages with unexpected structure
How to process FIX messages with unexpected structure
More like this
FIX and FIXML Dictionaries Customization Guide
FIX and FIXML Dictionaries Customization Guide
More like this
How to determine tag status in the FIX message using FixDictionary API in FIX Antenna C++
How to determine tag status in the FIX message using FixDictionary API in FIX Antenna C++
More like this
FMXML Handler
FMXML Handler
More like this