Loading XML data
Introduction
The previous section described the manual loading of CSV formatted data through the GUI. The loader will also recognize and load properly XML files of type "BoundaryRider Container", simply follow the instructions in the previous section but point to xml rather than csv files.
This section contains examples of xml load files. Xml data shows the structure of the interface more effectively than the csv examples in the previous section. This is because xml is naturally able to mimic the class hierarchy of the interface and the nested organisation of data.
For example a trade with cashflows is described in an intuitive way by the xml, with the cashflow data nested inside the trade, and individual date points (flows) nested inside a cashflow. Contrast this with the csv file format where the cashflows are on separate rows, and only related back to the trade by a trade id field at the start of the row. Furthermore, the outer part of the cashflow (notional and direction) is repeated on each row for each flow in the csv format.
A Note on Date Formats
The expectation is that users will have a preference for the CSV format when data needs to be prepared by humans, and our CSV format allows the user to specify a date format. However, when loads are automated it is more likely that the web service objects will be populated by computer code. Dates for XML files (or direct web service calls for that matter) must conform to our internal date format yyyy-MM-dd.
Example Trade XML
<?xml version="1.0" encoding="utf-8"?>
<BoundaryRiderContainer Version="8.0"><WorkflowTradeSet xmlns:xsd="http://www.w3.org/2001/
XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<calcDate>2012-12-31T00:00:00</calcDate>
<taskName>LoadTrades</taskName>
<trades>
<WorkflowTrade>
<book>202</book>
<counterparty>Cpty1</counterparty>
<pool>A</pool>
<sourceCurrency>USD</sourceCurrency>
<sourceMtm>500</sourceMtm>
<sourceNotional>5000000</sourceNotional>
<doneRetrieveCachedTrade>true</doneRetrieveCachedTrade>
<trade>
<product>IRSwap</product>
<representation>Cashflows</representation>
<sourceSystem>Murex</sourceSystem>
<sourceID>MUR37</sourceID>
<linkID>0</linkID>
<creditProtection>false</creditProtection>
<fields />
<cashflows>
<Cashflow>
<flowType>NoInterest</flowType>
<fields>
<Field>
<name>PayReceive</name>
<value>Receive</value>
</Field>
<Field>
<name>Currency</name>
<value>AUD</value>
</Field>
</fields>
<flows>
<Flow>
<fields>
<Field>
<name>FlowDate</name>
<value>2012-07-13</value>
</Field>
<Field>
<name>Amount</name>
<value>4500000</value>
</Field>
</fields>
</Flow>
<Flow>
<fields>
<Field>
<name>FlowDate</name>
<value>2012-08-13</value>
</Field>
<Field>
<name>Amount</name>
<value>4350000</value>
</Field>
</fields>
</Flow>
</flows>
</Cashflow>
<Cashflow>
<flowType>Fixed</flowType>
<fields>
<Field>
<name>PayReceive</name>
<value>Pay</value>
</Field>
<Field>
<name>Currency</name>
<value>AUD</value>
</Field>
<Field>
<name>InterestStyle</name>
<value>Discount</value>
</Field>
<Field>
<name>AccrualDayCount</name>
<value>ACT360</value>
</Field>
<Field>
<name>DiscountReference</name>
<value>BBSW</value>
</Field>
</fields>
<flows>
<Flow>
<fields>
<Field>
<name>FlowDate</name>
<value>2012-08-31</value>
</Field>
<Field>
<name>Amount</name>
<value>300000</value>
</Field>
<Field>
<name>FixedRate</name>
<value>0.034</value>
</Field>
<Field>
<name>AccrualStartDate</name>
<value>2012-08-01</value>
</Field>
<Field>
<name>AccrualEndDate</name>
<value>2012-08-31</value>
</Field>
</fields>
</Flow>
</flows>
</Cashflow>
</cashflows>
</trade>
<varVector />
<refID>4f2740c929374715a5cf5a3a08ef4905-2</refID>
<refIndex>1</refIndex>
</WorkflowTrade>
</trades>
</WorkflowTradeSet></Vector RiskContainer>