public BulletPayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
 public BulletPayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     foreach (XmlNode item in newTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(newTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             newTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList newTradeNodeList = xmlNode.SelectNodes("newTrade");
     if (newTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in newTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(newTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 newTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     foreach (XmlNode item in oldTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(oldTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             oldTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");
     if (oldTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(oldTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeIdentifierNodeList = xmlNode.SelectNodes("feeTradeIdentifier");
     if (feeTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifier ob = PartyTradeIdentifier();
                 IDManager.SetID(feeTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTradeIdentifier = new PartyTradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeNodeList = xmlNode.SelectNodes("feeTrade");
     if (feeTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(feeTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList transferorNodeList = xmlNode.SelectNodes("transferor");
     if (transferorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transferorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferor = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transferorAccountNodeList = xmlNode.SelectNodes("transferorAccount");
     if (transferorAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transferorAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferorAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeNodeList = xmlNode.SelectNodes("transferee");
     if (transfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeNodeList = xmlNode.SelectNodes("otherTransferee");
     if (otherTransfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherTransfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeAccountNodeList = xmlNode.SelectNodes("transfereeAccount");
     if (transfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeAccountNodeList = xmlNode.SelectNodes("otherTransfereeAccount");
     if (otherTransfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherTransfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyNodeList = xmlNode.SelectNodes("remainingParty");
     if (remainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(remainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyAccountNodeList = xmlNode.SelectNodes("remainingPartyAccount");
     if (remainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(remainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyNodeList = xmlNode.SelectNodes("otherRemainingParty");
     if (otherRemainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherRemainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyAccountNodeList = xmlNode.SelectNodes("otherRemainingPartyAccount");
     if (otherRemainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherRemainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList novationDateNodeList = xmlNode.SelectNodes("novationDate");
     if (novationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");
     if (executionDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef = item.Attributes["id"].Name;
                 ExecutionDateTime ob = ExecutionDateTime();
                 IDManager.SetID(executionDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionDateTime = new ExecutionDateTime(item);
             }
         }
     }
     
 
     XmlNodeList novationTradeDateNodeList = xmlNode.SelectNodes("novationTradeDate");
     if (novationTradeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationTradeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationTradeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationTradeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationTradeDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     foreach (XmlNode item in novatedAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(novatedAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             novatedAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     foreach (XmlNode item in remainingAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(remainingAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             remainingAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfOptionsNodeList = xmlNode.SelectNodes("novatedNumberOfOptions");
     if (novatedNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfOptionsNodeList = xmlNode.SelectNodes("remainingNumberOfOptions");
     if (remainingNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfUnitsNodeList = xmlNode.SelectNodes("novatedNumberOfUnits");
     if (novatedNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfUnitsNodeList = xmlNode.SelectNodes("remainingNumberOfUnits");
     if (remainingNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fullFirstCalculationPeriodNodeList = xmlNode.SelectNodes("fullFirstCalculationPeriod");
     if (fullFirstCalculationPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fullFirstCalculationPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fullFirstCalculationPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fullFirstCalculationPeriod = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 List<FirstPeriodStartDate> ob = new List<FirstPeriodStartDate>();
                 ob.Add(new FirstPeriodStartDate(item));
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             firstPeriodStartDate.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNodeList nonRelianceNodeList = xmlNode.SelectNodes("nonReliance");
     if (nonRelianceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonRelianceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonRelianceIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(nonRelianceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonRelianceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonReliance = new Empty(item);
             }
         }
     }
     
 
     XmlNodeList creditDerivativesNoticesNodeList = xmlNode.SelectNodes("creditDerivativesNotices");
     if (creditDerivativesNoticesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDerivativesNoticesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef = item.Attributes["id"].Name;
                 CreditDerivativesNotices ob = CreditDerivativesNotices();
                 IDManager.SetID(creditDerivativesNoticesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDerivativesNoticesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDerivativesNotices = new CreditDerivativesNotices(item);
             }
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     foreach (XmlNode item in contractualDefinitionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualDefinitionsIDRef = item.Attributes["id"].Name;
                 List<ContractualDefinitions> ob = new List<ContractualDefinitions>();
                 ob.Add(new ContractualDefinitions(item));
                 IDManager.SetID(contractualDefinitionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualDefinitionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualDefinitions.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     foreach (XmlNode item in contractualTermsSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualTermsSupplementIDRef = item.Attributes["id"].Name;
                 List<ContractualTermsSupplement> ob = new List<ContractualTermsSupplement>();
                 ob.Add(new ContractualTermsSupplement(item));
                 IDManager.SetID(contractualTermsSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualTermsSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualTermsSupplement.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
 public FxSingleLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList exchangedCurrency1NodeList = xmlNode.SelectNodes("exchangedCurrency1");
     if (exchangedCurrency1NodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangedCurrency1NodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangedCurrency1IDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(exchangedCurrency1IDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangedCurrency1IDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangedCurrency1 = new Payment(item);
             }
         }
     }
     
 
     XmlNodeList exchangedCurrency2NodeList = xmlNode.SelectNodes("exchangedCurrency2");
     if (exchangedCurrency2NodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangedCurrency2NodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangedCurrency2IDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(exchangedCurrency2IDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangedCurrency2IDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangedCurrency2 = new Payment(item);
             }
         }
     }
     
 
     XmlNodeList dealtCurrencyNodeList = xmlNode.SelectNodes("dealtCurrency");
     if (dealtCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dealtCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dealtCurrencyIDRef = item.Attributes["id"].Name;
                 DealtCurrencyEnum ob = DealtCurrencyEnum();
                 IDManager.SetID(dealtCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dealtCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dealtCurrency = new DealtCurrencyEnum(item);
             }
         }
     }
     
 
     XmlNodeList tenorNameNodeList = xmlNode.SelectNodes("tenorName");
     if (tenorNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tenorNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tenorNameIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(tenorNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tenorNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tenorName = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod");
     if (tenorPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tenorPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(tenorPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tenorPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tenorPeriod = new Period(item);
             }
         }
     }
     
 
     XmlNodeList valueDateNodeList = xmlNode.SelectNodes("valueDate");
     if (valueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(valueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList currency1ValueDateNodeList = xmlNode.SelectNodes("currency1ValueDate");
     if (currency1ValueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currency1ValueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currency1ValueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(currency1ValueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currency1ValueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency1ValueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList currency2ValueDateNodeList = xmlNode.SelectNodes("currency2ValueDate");
     if (currency2ValueDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currency2ValueDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currency2ValueDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(currency2ValueDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currency2ValueDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency2ValueDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList exchangeRateNodeList = xmlNode.SelectNodes("exchangeRate");
     if (exchangeRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeRateIDRef = item.Attributes["id"].Name;
                 ExchangeRate ob = ExchangeRate();
                 IDManager.SetID(exchangeRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeRate = new ExchangeRate(item);
             }
         }
     }
     
 
     XmlNodeList nonDeliverableSettlementNodeList = xmlNode.SelectNodes("nonDeliverableSettlement");
     if (nonDeliverableSettlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonDeliverableSettlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonDeliverableSettlementIDRef = item.Attributes["id"].Name;
                 FxCashSettlement ob = FxCashSettlement();
                 IDManager.SetID(nonDeliverableSettlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonDeliverableSettlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonDeliverableSettlement = new FxCashSettlement(item);
             }
         }
     }
     
 
 }
 public ForwardSale(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");
     
     if (buyerPartyReferenceNode != null)
     {
         if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (buyerPartyReferenceNode.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                 IDManager.SetID(buyerPartyReferenceIDRef_, ob);
             }
             else if (buyerPartyReferenceNode.Attributes["href"] != null)
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
             }
         }
         else
         {
             buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
         }
     }
     
 
     XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");
     
     if (buyerAccountReferenceNode != null)
     {
         if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (buyerAccountReferenceNode.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                 IDManager.SetID(buyerAccountReferenceIDRef_, ob);
             }
             else if (buyerAccountReferenceNode.Attributes["href"] != null)
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
             }
         }
         else
         {
             buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
         }
     }
     
 
     XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");
     
     if (sellerPartyReferenceNode != null)
     {
         if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (sellerPartyReferenceNode.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                 IDManager.SetID(sellerPartyReferenceIDRef_, ob);
             }
             else if (sellerPartyReferenceNode.Attributes["href"] != null)
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
             }
         }
         else
         {
             sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
         }
     }
     
 
     XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");
     
     if (sellerAccountReferenceNode != null)
     {
         if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (sellerAccountReferenceNode.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                 IDManager.SetID(sellerAccountReferenceIDRef_, ob);
             }
             else if (sellerAccountReferenceNode.Attributes["href"] != null)
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
             }
         }
         else
         {
             sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
         }
     }
     
 
     XmlNode underlyingAssetNode = xmlNode.SelectSingleNode("underlyingAsset");
     
     if (underlyingAssetNode != null)
     {
         if (underlyingAssetNode.Attributes["href"] != null || underlyingAssetNode.Attributes["id"] != null) 
         {
             if (underlyingAssetNode.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["id"].Value;
                 Asset ob = new Asset(underlyingAssetNode);
                 IDManager.SetID(underlyingAssetIDRef_, ob);
             }
             else if (underlyingAssetNode.Attributes["href"] != null)
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["href"].Value;
             }
             else
             {
                 underlyingAsset_ = new Asset(underlyingAssetNode);
             }
         }
         else
         {
             underlyingAsset_ = new Asset(underlyingAssetNode);
         }
     }
     
 
     XmlNode basketNode = xmlNode.SelectSingleNode("basket");
     
     if (basketNode != null)
     {
         if (basketNode.Attributes["href"] != null || basketNode.Attributes["id"] != null) 
         {
             if (basketNode.Attributes["id"] != null) 
             {
                 basketIDRef_ = basketNode.Attributes["id"].Value;
                 Basket ob = new Basket(basketNode);
                 IDManager.SetID(basketIDRef_, ob);
             }
             else if (basketNode.Attributes["href"] != null)
             {
                 basketIDRef_ = basketNode.Attributes["href"].Value;
             }
             else
             {
                 basket_ = new Basket(basketNode);
             }
         }
         else
         {
             basket_ = new Basket(basketNode);
         }
     }
     
 
     XmlNode bondNode = xmlNode.SelectSingleNode("bond");
     
     if (bondNode != null)
     {
         if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) 
         {
             if (bondNode.Attributes["id"] != null) 
             {
                 bondIDRef_ = bondNode.Attributes["id"].Value;
                 Bond ob = new Bond(bondNode);
                 IDManager.SetID(bondIDRef_, ob);
             }
             else if (bondNode.Attributes["href"] != null)
             {
                 bondIDRef_ = bondNode.Attributes["href"].Value;
             }
             else
             {
                 bond_ = new Bond(bondNode);
             }
         }
         else
         {
             bond_ = new Bond(bondNode);
         }
     }
     
 
     XmlNode cashNode = xmlNode.SelectSingleNode("cash");
     
     if (cashNode != null)
     {
         if (cashNode.Attributes["href"] != null || cashNode.Attributes["id"] != null) 
         {
             if (cashNode.Attributes["id"] != null) 
             {
                 cashIDRef_ = cashNode.Attributes["id"].Value;
                 Cash ob = new Cash(cashNode);
                 IDManager.SetID(cashIDRef_, ob);
             }
             else if (cashNode.Attributes["href"] != null)
             {
                 cashIDRef_ = cashNode.Attributes["href"].Value;
             }
             else
             {
                 cash_ = new Cash(cashNode);
             }
         }
         else
         {
             cash_ = new Cash(cashNode);
         }
     }
     
 
     XmlNode commodityNode = xmlNode.SelectSingleNode("commodity");
     
     if (commodityNode != null)
     {
         if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) 
         {
             if (commodityNode.Attributes["id"] != null) 
             {
                 commodityIDRef_ = commodityNode.Attributes["id"].Value;
                 Commodity ob = new Commodity(commodityNode);
                 IDManager.SetID(commodityIDRef_, ob);
             }
             else if (commodityNode.Attributes["href"] != null)
             {
                 commodityIDRef_ = commodityNode.Attributes["href"].Value;
             }
             else
             {
                 commodity_ = new Commodity(commodityNode);
             }
         }
         else
         {
             commodity_ = new Commodity(commodityNode);
         }
     }
     
 
     XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");
     
     if (convertibleBondNode != null)
     {
         if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) 
         {
             if (convertibleBondNode.Attributes["id"] != null) 
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                 ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                 IDManager.SetID(convertibleBondIDRef_, ob);
             }
             else if (convertibleBondNode.Attributes["href"] != null)
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
             }
             else
             {
                 convertibleBond_ = new ConvertibleBond(convertibleBondNode);
             }
         }
         else
         {
             convertibleBond_ = new ConvertibleBond(convertibleBondNode);
         }
     }
     
 
     XmlNode equityNode = xmlNode.SelectSingleNode("equity");
     
     if (equityNode != null)
     {
         if (equityNode.Attributes["href"] != null || equityNode.Attributes["id"] != null) 
         {
             if (equityNode.Attributes["id"] != null) 
             {
                 equityIDRef_ = equityNode.Attributes["id"].Value;
                 EquityAsset ob = new EquityAsset(equityNode);
                 IDManager.SetID(equityIDRef_, ob);
             }
             else if (equityNode.Attributes["href"] != null)
             {
                 equityIDRef_ = equityNode.Attributes["href"].Value;
             }
             else
             {
                 equity_ = new EquityAsset(equityNode);
             }
         }
         else
         {
             equity_ = new EquityAsset(equityNode);
         }
     }
     
 
     XmlNode exchangeTradedFundNode = xmlNode.SelectSingleNode("exchangeTradedFund");
     
     if (exchangeTradedFundNode != null)
     {
         if (exchangeTradedFundNode.Attributes["href"] != null || exchangeTradedFundNode.Attributes["id"] != null) 
         {
             if (exchangeTradedFundNode.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["id"].Value;
                 ExchangeTradedFund ob = new ExchangeTradedFund(exchangeTradedFundNode);
                 IDManager.SetID(exchangeTradedFundIDRef_, ob);
             }
             else if (exchangeTradedFundNode.Attributes["href"] != null)
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
             }
         }
         else
         {
             exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
         }
     }
     
 
     XmlNode futureNode = xmlNode.SelectSingleNode("future");
     
     if (futureNode != null)
     {
         if (futureNode.Attributes["href"] != null || futureNode.Attributes["id"] != null) 
         {
             if (futureNode.Attributes["id"] != null) 
             {
                 futureIDRef_ = futureNode.Attributes["id"].Value;
                 Future ob = new Future(futureNode);
                 IDManager.SetID(futureIDRef_, ob);
             }
             else if (futureNode.Attributes["href"] != null)
             {
                 futureIDRef_ = futureNode.Attributes["href"].Value;
             }
             else
             {
                 future_ = new Future(futureNode);
             }
         }
         else
         {
             future_ = new Future(futureNode);
         }
     }
     
 
     XmlNode indexNode = xmlNode.SelectSingleNode("index");
     
     if (indexNode != null)
     {
         if (indexNode.Attributes["href"] != null || indexNode.Attributes["id"] != null) 
         {
             if (indexNode.Attributes["id"] != null) 
             {
                 indexIDRef_ = indexNode.Attributes["id"].Value;
                 Index ob = new Index(indexNode);
                 IDManager.SetID(indexIDRef_, ob);
             }
             else if (indexNode.Attributes["href"] != null)
             {
                 indexIDRef_ = indexNode.Attributes["href"].Value;
             }
             else
             {
                 index_ = new Index(indexNode);
             }
         }
         else
         {
             index_ = new Index(indexNode);
         }
     }
     
 
     XmlNode loanNode = xmlNode.SelectSingleNode("loan");
     
     if (loanNode != null)
     {
         if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) 
         {
             if (loanNode.Attributes["id"] != null) 
             {
                 loanIDRef_ = loanNode.Attributes["id"].Value;
                 Loan ob = new Loan(loanNode);
                 IDManager.SetID(loanIDRef_, ob);
             }
             else if (loanNode.Attributes["href"] != null)
             {
                 loanIDRef_ = loanNode.Attributes["href"].Value;
             }
             else
             {
                 loan_ = new Loan(loanNode);
             }
         }
         else
         {
             loan_ = new Loan(loanNode);
         }
     }
     
 
     XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");
     
     if (mortgageNode != null)
     {
         if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) 
         {
             if (mortgageNode.Attributes["id"] != null) 
             {
                 mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                 Mortgage ob = new Mortgage(mortgageNode);
                 IDManager.SetID(mortgageIDRef_, ob);
             }
             else if (mortgageNode.Attributes["href"] != null)
             {
                 mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
             }
             else
             {
                 mortgage_ = new Mortgage(mortgageNode);
             }
         }
         else
         {
             mortgage_ = new Mortgage(mortgageNode);
         }
     }
     
 
     XmlNode mutualFundNode = xmlNode.SelectSingleNode("mutualFund");
     
     if (mutualFundNode != null)
     {
         if (mutualFundNode.Attributes["href"] != null || mutualFundNode.Attributes["id"] != null) 
         {
             if (mutualFundNode.Attributes["id"] != null) 
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["id"].Value;
                 MutualFund ob = new MutualFund(mutualFundNode);
                 IDManager.SetID(mutualFundIDRef_, ob);
             }
             else if (mutualFundNode.Attributes["href"] != null)
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["href"].Value;
             }
             else
             {
                 mutualFund_ = new MutualFund(mutualFundNode);
             }
         }
         else
         {
             mutualFund_ = new MutualFund(mutualFundNode);
         }
     }
     
 
     XmlNode forwardSaleDateNode = xmlNode.SelectSingleNode("forwardSaleDate");
     
     if (forwardSaleDateNode != null)
     {
         if (forwardSaleDateNode.Attributes["href"] != null || forwardSaleDateNode.Attributes["id"] != null) 
         {
             if (forwardSaleDateNode.Attributes["id"] != null) 
             {
                 forwardSaleDateIDRef_ = forwardSaleDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(forwardSaleDateNode);
                 IDManager.SetID(forwardSaleDateIDRef_, ob);
             }
             else if (forwardSaleDateNode.Attributes["href"] != null)
             {
                 forwardSaleDateIDRef_ = forwardSaleDateNode.Attributes["href"].Value;
             }
             else
             {
                 forwardSaleDate_ = new XsdTypeDate(forwardSaleDateNode);
             }
         }
         else
         {
             forwardSaleDate_ = new XsdTypeDate(forwardSaleDateNode);
         }
     }
     
 
     XmlNode settlementNode = xmlNode.SelectSingleNode("settlement");
     
     if (settlementNode != null)
     {
         if (settlementNode.Attributes["href"] != null || settlementNode.Attributes["id"] != null) 
         {
             if (settlementNode.Attributes["id"] != null) 
             {
                 settlementIDRef_ = settlementNode.Attributes["id"].Value;
                 Payment ob = new Payment(settlementNode);
                 IDManager.SetID(settlementIDRef_, ob);
             }
             else if (settlementNode.Attributes["href"] != null)
             {
                 settlementIDRef_ = settlementNode.Attributes["href"].Value;
             }
             else
             {
                 settlement_ = new Payment(settlementNode);
             }
         }
         else
         {
             settlement_ = new Payment(settlementNode);
         }
     }
     
 
     XmlNode priceNode = xmlNode.SelectSingleNode("price");
     
     if (priceNode != null)
     {
         if (priceNode.Attributes["href"] != null || priceNode.Attributes["id"] != null) 
         {
             if (priceNode.Attributes["id"] != null) 
             {
                 priceIDRef_ = priceNode.Attributes["id"].Value;
                 Price ob = new Price(priceNode);
                 IDManager.SetID(priceIDRef_, ob);
             }
             else if (priceNode.Attributes["href"] != null)
             {
                 priceIDRef_ = priceNode.Attributes["href"].Value;
             }
             else
             {
                 price_ = new Price(priceNode);
             }
         }
         else
         {
             price_ = new Price(priceNode);
         }
     }
     
 
 }
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     if (newTradeIdentifierNodeList != null)
     {
         this.newTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in newTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(newTradeIdentifierIDRef_, newTradeIdentifier_[newTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode newTradeNode = xmlNode.SelectSingleNode("newTrade");
     
     if (newTradeNode != null)
     {
         if (newTradeNode.Attributes["href"] != null || newTradeNode.Attributes["id"] != null) 
         {
             if (newTradeNode.Attributes["id"] != null) 
             {
                 newTradeIDRef_ = newTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(newTradeNode);
                 IDManager.SetID(newTradeIDRef_, ob);
             }
             else if (newTradeNode.Attributes["href"] != null)
             {
                 newTradeIDRef_ = newTradeNode.Attributes["href"].Value;
             }
             else
             {
                 newTrade_ = new Trade(newTradeNode);
             }
         }
         else
         {
             newTrade_ = new Trade(newTradeNode);
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     if (oldTradeIdentifierNodeList != null)
     {
         this.oldTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in oldTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(oldTradeIdentifierIDRef_, oldTradeIdentifier_[oldTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode oldTradeNode = xmlNode.SelectSingleNode("oldTrade");
     
     if (oldTradeNode != null)
     {
         if (oldTradeNode.Attributes["href"] != null || oldTradeNode.Attributes["id"] != null) 
         {
             if (oldTradeNode.Attributes["id"] != null) 
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(oldTradeNode);
                 IDManager.SetID(oldTradeIDRef_, ob);
             }
             else if (oldTradeNode.Attributes["href"] != null)
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["href"].Value;
             }
             else
             {
                 oldTrade_ = new Trade(oldTradeNode);
             }
         }
         else
         {
             oldTrade_ = new Trade(oldTradeNode);
         }
     }
     
 
     XmlNode feeTradeIdentifierNode = xmlNode.SelectSingleNode("feeTradeIdentifier");
     
     if (feeTradeIdentifierNode != null)
     {
         if (feeTradeIdentifierNode.Attributes["href"] != null || feeTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (feeTradeIdentifierNode.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["id"].Value;
                 PartyTradeIdentifier ob = new PartyTradeIdentifier(feeTradeIdentifierNode);
                 IDManager.SetID(feeTradeIdentifierIDRef_, ob);
             }
             else if (feeTradeIdentifierNode.Attributes["href"] != null)
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
             }
         }
         else
         {
             feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
         }
     }
     
 
     XmlNode feeTradeNode = xmlNode.SelectSingleNode("feeTrade");
     
     if (feeTradeNode != null)
     {
         if (feeTradeNode.Attributes["href"] != null || feeTradeNode.Attributes["id"] != null) 
         {
             if (feeTradeNode.Attributes["id"] != null) 
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(feeTradeNode);
                 IDManager.SetID(feeTradeIDRef_, ob);
             }
             else if (feeTradeNode.Attributes["href"] != null)
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["href"].Value;
             }
             else
             {
                 feeTrade_ = new Trade(feeTradeNode);
             }
         }
         else
         {
             feeTrade_ = new Trade(feeTradeNode);
         }
     }
     
 
     XmlNode transferorNode = xmlNode.SelectSingleNode("transferor");
     
     if (transferorNode != null)
     {
         if (transferorNode.Attributes["href"] != null || transferorNode.Attributes["id"] != null) 
         {
             if (transferorNode.Attributes["id"] != null) 
             {
                 transferorIDRef_ = transferorNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transferorNode);
                 IDManager.SetID(transferorIDRef_, ob);
             }
             else if (transferorNode.Attributes["href"] != null)
             {
                 transferorIDRef_ = transferorNode.Attributes["href"].Value;
             }
             else
             {
                 transferor_ = new PartyReference(transferorNode);
             }
         }
         else
         {
             transferor_ = new PartyReference(transferorNode);
         }
     }
     
 
     XmlNode transferorAccountNode = xmlNode.SelectSingleNode("transferorAccount");
     
     if (transferorAccountNode != null)
     {
         if (transferorAccountNode.Attributes["href"] != null || transferorAccountNode.Attributes["id"] != null) 
         {
             if (transferorAccountNode.Attributes["id"] != null) 
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transferorAccountNode);
                 IDManager.SetID(transferorAccountIDRef_, ob);
             }
             else if (transferorAccountNode.Attributes["href"] != null)
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transferorAccount_ = new AccountReference(transferorAccountNode);
             }
         }
         else
         {
             transferorAccount_ = new AccountReference(transferorAccountNode);
         }
     }
     
 
     XmlNode transfereeNode = xmlNode.SelectSingleNode("transferee");
     
     if (transfereeNode != null)
     {
         if (transfereeNode.Attributes["href"] != null || transfereeNode.Attributes["id"] != null) 
         {
             if (transfereeNode.Attributes["id"] != null) 
             {
                 transfereeIDRef_ = transfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transfereeNode);
                 IDManager.SetID(transfereeIDRef_, ob);
             }
             else if (transfereeNode.Attributes["href"] != null)
             {
                 transfereeIDRef_ = transfereeNode.Attributes["href"].Value;
             }
             else
             {
                 transferee_ = new PartyReference(transfereeNode);
             }
         }
         else
         {
             transferee_ = new PartyReference(transfereeNode);
         }
     }
     
 
     XmlNode otherTransfereeNode = xmlNode.SelectSingleNode("otherTransferee");
     
     if (otherTransfereeNode != null)
     {
         if (otherTransfereeNode.Attributes["href"] != null || otherTransfereeNode.Attributes["id"] != null) 
         {
             if (otherTransfereeNode.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherTransfereeNode);
                 IDManager.SetID(otherTransfereeIDRef_, ob);
             }
             else if (otherTransfereeNode.Attributes["href"] != null)
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransferee_ = new PartyReference(otherTransfereeNode);
             }
         }
         else
         {
             otherTransferee_ = new PartyReference(otherTransfereeNode);
         }
     }
     
 
     XmlNode transfereeAccountNode = xmlNode.SelectSingleNode("transfereeAccount");
     
     if (transfereeAccountNode != null)
     {
         if (transfereeAccountNode.Attributes["href"] != null || transfereeAccountNode.Attributes["id"] != null) 
         {
             if (transfereeAccountNode.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transfereeAccountNode);
                 IDManager.SetID(transfereeAccountIDRef_, ob);
             }
             else if (transfereeAccountNode.Attributes["href"] != null)
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transfereeAccount_ = new AccountReference(transfereeAccountNode);
             }
         }
         else
         {
             transfereeAccount_ = new AccountReference(transfereeAccountNode);
         }
     }
     
 
     XmlNode otherTransfereeAccountNode = xmlNode.SelectSingleNode("otherTransfereeAccount");
     
     if (otherTransfereeAccountNode != null)
     {
         if (otherTransfereeAccountNode.Attributes["href"] != null || otherTransfereeAccountNode.Attributes["id"] != null) 
         {
             if (otherTransfereeAccountNode.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherTransfereeAccountNode);
                 IDManager.SetID(otherTransfereeAccountIDRef_, ob);
             }
             else if (otherTransfereeAccountNode.Attributes["href"] != null)
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
             }
         }
         else
         {
             otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
         }
     }
     
 
     XmlNode remainingPartyNode = xmlNode.SelectSingleNode("remainingParty");
     
     if (remainingPartyNode != null)
     {
         if (remainingPartyNode.Attributes["href"] != null || remainingPartyNode.Attributes["id"] != null) 
         {
             if (remainingPartyNode.Attributes["id"] != null) 
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(remainingPartyNode);
                 IDManager.SetID(remainingPartyIDRef_, ob);
             }
             else if (remainingPartyNode.Attributes["href"] != null)
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 remainingParty_ = new PartyReference(remainingPartyNode);
             }
         }
         else
         {
             remainingParty_ = new PartyReference(remainingPartyNode);
         }
     }
     
 
     XmlNode remainingPartyAccountNode = xmlNode.SelectSingleNode("remainingPartyAccount");
     
     if (remainingPartyAccountNode != null)
     {
         if (remainingPartyAccountNode.Attributes["href"] != null || remainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (remainingPartyAccountNode.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(remainingPartyAccountNode);
                 IDManager.SetID(remainingPartyAccountIDRef_, ob);
             }
             else if (remainingPartyAccountNode.Attributes["href"] != null)
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
             }
         }
         else
         {
             remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
         }
     }
     
 
     XmlNode otherRemainingPartyNode = xmlNode.SelectSingleNode("otherRemainingParty");
     
     if (otherRemainingPartyNode != null)
     {
         if (otherRemainingPartyNode.Attributes["href"] != null || otherRemainingPartyNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherRemainingPartyNode);
                 IDManager.SetID(otherRemainingPartyIDRef_, ob);
             }
             else if (otherRemainingPartyNode.Attributes["href"] != null)
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
             }
         }
         else
         {
             otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
         }
     }
     
 
     XmlNode otherRemainingPartyAccountNode = xmlNode.SelectSingleNode("otherRemainingPartyAccount");
     
     if (otherRemainingPartyAccountNode != null)
     {
         if (otherRemainingPartyAccountNode.Attributes["href"] != null || otherRemainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyAccountNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherRemainingPartyAccountNode);
                 IDManager.SetID(otherRemainingPartyAccountIDRef_, ob);
             }
             else if (otherRemainingPartyAccountNode.Attributes["href"] != null)
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
             }
         }
         else
         {
             otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
         }
     }
     
 
     XmlNode novationDateNode = xmlNode.SelectSingleNode("novationDate");
     
     if (novationDateNode != null)
     {
         if (novationDateNode.Attributes["href"] != null || novationDateNode.Attributes["id"] != null) 
         {
             if (novationDateNode.Attributes["id"] != null) 
             {
                 novationDateIDRef_ = novationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationDateNode);
                 IDManager.SetID(novationDateIDRef_, ob);
             }
             else if (novationDateNode.Attributes["href"] != null)
             {
                 novationDateIDRef_ = novationDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationDate_ = new XsdTypeDate(novationDateNode);
             }
         }
         else
         {
             novationDate_ = new XsdTypeDate(novationDateNode);
         }
     }
     
 
     XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");
     
     if (executionDateTimeNode != null)
     {
         if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null) 
         {
             if (executionDateTimeNode.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                 ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                 IDManager.SetID(executionDateTimeIDRef_, ob);
             }
             else if (executionDateTimeNode.Attributes["href"] != null)
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
             }
         }
         else
         {
             executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
         }
     }
     
 
     XmlNode novationTradeDateNode = xmlNode.SelectSingleNode("novationTradeDate");
     
     if (novationTradeDateNode != null)
     {
         if (novationTradeDateNode.Attributes["href"] != null || novationTradeDateNode.Attributes["id"] != null) 
         {
             if (novationTradeDateNode.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationTradeDateNode);
                 IDManager.SetID(novationTradeDateIDRef_, ob);
             }
             else if (novationTradeDateNode.Attributes["href"] != null)
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
             }
         }
         else
         {
             novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     if (novatedAmountNodeList != null)
     {
         this.novatedAmount_ = new List<Money>();
         foreach (XmlNode item in novatedAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     novatedAmountIDRef_ = item.Attributes["id"].Value;
                     novatedAmount_.Add(new Money(item));
                     IDManager.SetID(novatedAmountIDRef_, novatedAmount_[novatedAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     novatedAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 novatedAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 novatedAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     if (remainingAmountNodeList != null)
     {
         this.remainingAmount_ = new List<Money>();
         foreach (XmlNode item in remainingAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     remainingAmountIDRef_ = item.Attributes["id"].Value;
                     remainingAmount_.Add(new Money(item));
                     IDManager.SetID(remainingAmountIDRef_, remainingAmount_[remainingAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     remainingAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 remainingAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 remainingAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNode novatedNumberOfOptionsNode = xmlNode.SelectSingleNode("novatedNumberOfOptions");
     
     if (novatedNumberOfOptionsNode != null)
     {
         if (novatedNumberOfOptionsNode.Attributes["href"] != null || novatedNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfOptionsNode);
                 IDManager.SetID(novatedNumberOfOptionsIDRef_, ob);
             }
             else if (novatedNumberOfOptionsNode.Attributes["href"] != null)
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
             }
         }
         else
         {
             novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
         }
     }
     
 
     XmlNode remainingNumberOfOptionsNode = xmlNode.SelectSingleNode("remainingNumberOfOptions");
     
     if (remainingNumberOfOptionsNode != null)
     {
         if (remainingNumberOfOptionsNode.Attributes["href"] != null || remainingNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfOptionsNode);
                 IDManager.SetID(remainingNumberOfOptionsIDRef_, ob);
             }
             else if (remainingNumberOfOptionsNode.Attributes["href"] != null)
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
             }
         }
         else
         {
             remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
         }
     }
     
 
     XmlNode novatedNumberOfUnitsNode = xmlNode.SelectSingleNode("novatedNumberOfUnits");
     
     if (novatedNumberOfUnitsNode != null)
     {
         if (novatedNumberOfUnitsNode.Attributes["href"] != null || novatedNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfUnitsNode);
                 IDManager.SetID(novatedNumberOfUnitsIDRef_, ob);
             }
             else if (novatedNumberOfUnitsNode.Attributes["href"] != null)
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
             }
         }
         else
         {
             novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
         }
     }
     
 
     XmlNode remainingNumberOfUnitsNode = xmlNode.SelectSingleNode("remainingNumberOfUnits");
     
     if (remainingNumberOfUnitsNode != null)
     {
         if (remainingNumberOfUnitsNode.Attributes["href"] != null || remainingNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfUnitsNode);
                 IDManager.SetID(remainingNumberOfUnitsIDRef_, ob);
             }
             else if (remainingNumberOfUnitsNode.Attributes["href"] != null)
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
             }
         }
         else
         {
             remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
         }
     }
     
 
     XmlNode fullFirstCalculationPeriodNode = xmlNode.SelectSingleNode("fullFirstCalculationPeriod");
     
     if (fullFirstCalculationPeriodNode != null)
     {
         if (fullFirstCalculationPeriodNode.Attributes["href"] != null || fullFirstCalculationPeriodNode.Attributes["id"] != null) 
         {
             if (fullFirstCalculationPeriodNode.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
                 IDManager.SetID(fullFirstCalculationPeriodIDRef_, ob);
             }
             else if (fullFirstCalculationPeriodNode.Attributes["href"] != null)
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
             }
         }
         else
         {
             fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     if (firstPeriodStartDateNodeList != null)
     {
         this.firstPeriodStartDate_ = new List<FirstPeriodStartDate>();
         foreach (XmlNode item in firstPeriodStartDateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["id"].Value;
                     firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                     IDManager.SetID(firstPeriodStartDateIDRef_, firstPeriodStartDate_[firstPeriodStartDate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                 }
             }
             else
             {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNode nonRelianceNode = xmlNode.SelectSingleNode("nonReliance");
     
     if (nonRelianceNode != null)
     {
         if (nonRelianceNode.Attributes["href"] != null || nonRelianceNode.Attributes["id"] != null) 
         {
             if (nonRelianceNode.Attributes["id"] != null) 
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["id"].Value;
                 Empty ob = new Empty(nonRelianceNode);
                 IDManager.SetID(nonRelianceIDRef_, ob);
             }
             else if (nonRelianceNode.Attributes["href"] != null)
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["href"].Value;
             }
             else
             {
                 nonReliance_ = new Empty(nonRelianceNode);
             }
         }
         else
         {
             nonReliance_ = new Empty(nonRelianceNode);
         }
     }
     
 
     XmlNode creditDerivativesNoticesNode = xmlNode.SelectSingleNode("creditDerivativesNotices");
     
     if (creditDerivativesNoticesNode != null)
     {
         if (creditDerivativesNoticesNode.Attributes["href"] != null || creditDerivativesNoticesNode.Attributes["id"] != null) 
         {
             if (creditDerivativesNoticesNode.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["id"].Value;
                 CreditDerivativesNotices ob = new CreditDerivativesNotices(creditDerivativesNoticesNode);
                 IDManager.SetID(creditDerivativesNoticesIDRef_, ob);
             }
             else if (creditDerivativesNoticesNode.Attributes["href"] != null)
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["href"].Value;
             }
             else
             {
                 creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
             }
         }
         else
         {
             creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     if (contractualDefinitionsNodeList != null)
     {
         this.contractualDefinitions_ = new List<ContractualDefinitions>();
         foreach (XmlNode item in contractualDefinitionsNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["id"].Value;
                     contractualDefinitions_.Add(new ContractualDefinitions(item));
                     IDManager.SetID(contractualDefinitionsIDRef_, contractualDefinitions_[contractualDefinitions_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
                 }
             }
             else
             {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     if (contractualTermsSupplementNodeList != null)
     {
         this.contractualTermsSupplement_ = new List<ContractualTermsSupplement>();
         foreach (XmlNode item in contractualTermsSupplementNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["id"].Value;
                     contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                     IDManager.SetID(contractualTermsSupplementIDRef_, contractualTermsSupplement_[contractualTermsSupplement_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                 }
             }
             else
             {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }
 public TradeChangeContent(XmlNode xmlNode)
 {
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     if (oldTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifier ob = PartyTradeIdentifier();
                 IDManager.SetID(oldTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTradeIdentifier = new PartyTradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");
     if (oldTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(oldTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade");
     if (tradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(tradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 trade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList changeEventNodeList = xmlNode.SelectNodes("changeEvent");
     if (changeEventNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in changeEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 changeEventIDRef = item.Attributes["id"].Name;
                 ChangeEvent ob = ChangeEvent();
                 IDManager.SetID(changeEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 changeEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 changeEvent = new ChangeEvent(item);
             }
         }
     }
     
 
     XmlNodeList indexChangeNodeList = xmlNode.SelectNodes("indexChange");
     if (indexChangeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexChangeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexChangeIDRef = item.Attributes["id"].Name;
                 IndexChange ob = IndexChange();
                 IDManager.SetID(indexChangeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexChangeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexChange = new IndexChange(item);
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
 public TradeChangeContent(XmlNode xmlNode)
 {
     XmlNode oldTradeIdentifierNode = xmlNode.SelectSingleNode("oldTradeIdentifier");
     
     if (oldTradeIdentifierNode != null)
     {
         if (oldTradeIdentifierNode.Attributes["href"] != null || oldTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (oldTradeIdentifierNode.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef_ = oldTradeIdentifierNode.Attributes["id"].Value;
                 PartyTradeIdentifier ob = new PartyTradeIdentifier(oldTradeIdentifierNode);
                 IDManager.SetID(oldTradeIdentifierIDRef_, ob);
             }
             else if (oldTradeIdentifierNode.Attributes["href"] != null)
             {
                 oldTradeIdentifierIDRef_ = oldTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 oldTradeIdentifier_ = new PartyTradeIdentifier(oldTradeIdentifierNode);
             }
         }
         else
         {
             oldTradeIdentifier_ = new PartyTradeIdentifier(oldTradeIdentifierNode);
         }
     }
     
 
     XmlNode oldTradeNode = xmlNode.SelectSingleNode("oldTrade");
     
     if (oldTradeNode != null)
     {
         if (oldTradeNode.Attributes["href"] != null || oldTradeNode.Attributes["id"] != null) 
         {
             if (oldTradeNode.Attributes["id"] != null) 
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(oldTradeNode);
                 IDManager.SetID(oldTradeIDRef_, ob);
             }
             else if (oldTradeNode.Attributes["href"] != null)
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["href"].Value;
             }
             else
             {
                 oldTrade_ = new Trade(oldTradeNode);
             }
         }
         else
         {
             oldTrade_ = new Trade(oldTradeNode);
         }
     }
     
 
     XmlNode tradeNode = xmlNode.SelectSingleNode("trade");
     
     if (tradeNode != null)
     {
         if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) 
         {
             if (tradeNode.Attributes["id"] != null) 
             {
                 tradeIDRef_ = tradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(tradeNode);
                 IDManager.SetID(tradeIDRef_, ob);
             }
             else if (tradeNode.Attributes["href"] != null)
             {
                 tradeIDRef_ = tradeNode.Attributes["href"].Value;
             }
             else
             {
                 trade_ = new Trade(tradeNode);
             }
         }
         else
         {
             trade_ = new Trade(tradeNode);
         }
     }
     
 
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new XsdTypeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new XsdTypeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode changeEventNode = xmlNode.SelectSingleNode("changeEvent");
     
     if (changeEventNode != null)
     {
         if (changeEventNode.Attributes["href"] != null || changeEventNode.Attributes["id"] != null) 
         {
             if (changeEventNode.Attributes["id"] != null) 
             {
                 changeEventIDRef_ = changeEventNode.Attributes["id"].Value;
                 ChangeEvent ob = new ChangeEvent(changeEventNode);
                 IDManager.SetID(changeEventIDRef_, ob);
             }
             else if (changeEventNode.Attributes["href"] != null)
             {
                 changeEventIDRef_ = changeEventNode.Attributes["href"].Value;
             }
             else
             {
                 changeEvent_ = new ChangeEvent(changeEventNode);
             }
         }
         else
         {
             changeEvent_ = new ChangeEvent(changeEventNode);
         }
     }
     
 
     XmlNode indexChangeNode = xmlNode.SelectSingleNode("indexChange");
     
     if (indexChangeNode != null)
     {
         if (indexChangeNode.Attributes["href"] != null || indexChangeNode.Attributes["id"] != null) 
         {
             if (indexChangeNode.Attributes["id"] != null) 
             {
                 indexChangeIDRef_ = indexChangeNode.Attributes["id"].Value;
                 IndexChange ob = new IndexChange(indexChangeNode);
                 IDManager.SetID(indexChangeIDRef_, ob);
             }
             else if (indexChangeNode.Attributes["href"] != null)
             {
                 indexChangeIDRef_ = indexChangeNode.Attributes["href"].Value;
             }
             else
             {
                 indexChange_ = new IndexChange(indexChangeNode);
             }
         }
         else
         {
             indexChange_ = new IndexChange(indexChangeNode);
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }
 public ForwardSale(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");
     if (buyerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(buyerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");
     if (buyerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(buyerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");
     if (sellerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(sellerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");
     if (sellerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(sellerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset");
     if (underlyingAssetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyingAssetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef = item.Attributes["id"].Name;
                 Asset ob = Asset();
                 IDManager.SetID(underlyingAssetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyingAssetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyingAsset = new Asset(item);
             }
         }
     }
     
 
     XmlNodeList basketNodeList = xmlNode.SelectNodes("basket");
     if (basketNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketIDRef = item.Attributes["id"].Name;
                 Basket ob = Basket();
                 IDManager.SetID(basketIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basket = new Basket(item);
             }
         }
     }
     
 
     XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");
     if (bondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondIDRef = item.Attributes["id"].Name;
                 Bond ob = Bond();
                 IDManager.SetID(bondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bond = new Bond(item);
             }
         }
     }
     
 
     XmlNodeList cashNodeList = xmlNode.SelectNodes("cash");
     if (cashNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashIDRef = item.Attributes["id"].Name;
                 Cash ob = Cash();
                 IDManager.SetID(cashIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cash = new Cash(item);
             }
         }
     }
     
 
     XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");
     if (commodityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIDRef = item.Attributes["id"].Name;
                 Commodity ob = Commodity();
                 IDManager.SetID(commodityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodity = new Commodity(item);
             }
         }
     }
     
 
     XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");
     if (convertibleBondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in convertibleBondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 convertibleBondIDRef = item.Attributes["id"].Name;
                 ConvertibleBond ob = ConvertibleBond();
                 IDManager.SetID(convertibleBondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 convertibleBondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 convertibleBond = new ConvertibleBond(item);
             }
         }
     }
     
 
     XmlNodeList equityNodeList = xmlNode.SelectNodes("equity");
     if (equityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityIDRef = item.Attributes["id"].Name;
                 EquityAsset ob = EquityAsset();
                 IDManager.SetID(equityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equity = new EquityAsset(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund");
     if (exchangeTradedFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef = item.Attributes["id"].Name;
                 ExchangeTradedFund ob = ExchangeTradedFund();
                 IDManager.SetID(exchangeTradedFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedFund = new ExchangeTradedFund(item);
             }
         }
     }
     
 
     XmlNodeList futureNodeList = xmlNode.SelectNodes("future");
     if (futureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futureIDRef = item.Attributes["id"].Name;
                 Future ob = Future();
                 IDManager.SetID(futureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 future = new Future(item);
             }
         }
     }
     
 
     XmlNodeList indexNodeList = xmlNode.SelectNodes("index");
     if (indexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexIDRef = item.Attributes["id"].Name;
                 Index ob = Index();
                 IDManager.SetID(indexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 index = new Index(item);
             }
         }
     }
     
 
     XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");
     if (loanNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loanNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loanIDRef = item.Attributes["id"].Name;
                 Loan ob = Loan();
                 IDManager.SetID(loanIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loanIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loan = new Loan(item);
             }
         }
     }
     
 
     XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");
     if (mortgageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mortgageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mortgageIDRef = item.Attributes["id"].Name;
                 Mortgage ob = Mortgage();
                 IDManager.SetID(mortgageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mortgageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mortgage = new Mortgage(item);
             }
         }
     }
     
 
     XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund");
     if (mutualFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mutualFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mutualFundIDRef = item.Attributes["id"].Name;
                 MutualFund ob = MutualFund();
                 IDManager.SetID(mutualFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mutualFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mutualFund = new MutualFund(item);
             }
         }
     }
     
 
     XmlNodeList forwardSaleDateNodeList = xmlNode.SelectNodes("forwardSaleDate");
     if (forwardSaleDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forwardSaleDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forwardSaleDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(forwardSaleDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forwardSaleDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forwardSaleDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList settlementNodeList = xmlNode.SelectNodes("settlement");
     if (settlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(settlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlement = new Payment(item);
             }
         }
     }
     
 
     XmlNodeList priceNodeList = xmlNode.SelectNodes("price");
     if (priceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceIDRef = item.Attributes["id"].Name;
                 Price ob = Price();
                 IDManager.SetID(priceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 price = new Price(item);
             }
         }
     }
     
 
 }
 public FxSwapLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode tradeIdentifierReferenceNode = xmlNode.SelectSingleNode("tradeIdentifierReference");
     
     if (tradeIdentifierReferenceNode != null)
     {
         if (tradeIdentifierReferenceNode.Attributes["href"] != null || tradeIdentifierReferenceNode.Attributes["id"] != null) 
         {
             if (tradeIdentifierReferenceNode.Attributes["id"] != null) 
             {
                 tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["id"].Value;
                 PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                 IDManager.SetID(tradeIdentifierReferenceIDRef_, ob);
             }
             else if (tradeIdentifierReferenceNode.Attributes["href"] != null)
             {
                 tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
             }
         }
         else
         {
             tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
         }
     }
     
 
     XmlNode exchangedCurrency1Node = xmlNode.SelectSingleNode("exchangedCurrency1");
     
     if (exchangedCurrency1Node != null)
     {
         if (exchangedCurrency1Node.Attributes["href"] != null || exchangedCurrency1Node.Attributes["id"] != null) 
         {
             if (exchangedCurrency1Node.Attributes["id"] != null) 
             {
                 exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["id"].Value;
                 Payment ob = new Payment(exchangedCurrency1Node);
                 IDManager.SetID(exchangedCurrency1IDRef_, ob);
             }
             else if (exchangedCurrency1Node.Attributes["href"] != null)
             {
                 exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["href"].Value;
             }
             else
             {
                 exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
             }
         }
         else
         {
             exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
         }
     }
     
 
     XmlNode exchangedCurrency2Node = xmlNode.SelectSingleNode("exchangedCurrency2");
     
     if (exchangedCurrency2Node != null)
     {
         if (exchangedCurrency2Node.Attributes["href"] != null || exchangedCurrency2Node.Attributes["id"] != null) 
         {
             if (exchangedCurrency2Node.Attributes["id"] != null) 
             {
                 exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["id"].Value;
                 Payment ob = new Payment(exchangedCurrency2Node);
                 IDManager.SetID(exchangedCurrency2IDRef_, ob);
             }
             else if (exchangedCurrency2Node.Attributes["href"] != null)
             {
                 exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["href"].Value;
             }
             else
             {
                 exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
             }
         }
         else
         {
             exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
         }
     }
     
 
     XmlNode dealtCurrencyNode = xmlNode.SelectSingleNode("dealtCurrency");
     
     if (dealtCurrencyNode != null)
     {
         if (dealtCurrencyNode.Attributes["href"] != null || dealtCurrencyNode.Attributes["id"] != null) 
         {
             if (dealtCurrencyNode.Attributes["id"] != null) 
             {
                 dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["id"].Value;
                 DealtCurrencyEnum ob = new DealtCurrencyEnum(dealtCurrencyNode);
                 IDManager.SetID(dealtCurrencyIDRef_, ob);
             }
             else if (dealtCurrencyNode.Attributes["href"] != null)
             {
                 dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
             }
         }
         else
         {
             dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
         }
     }
     
 
     XmlNode tenorNameNode = xmlNode.SelectSingleNode("tenorName");
     
     if (tenorNameNode != null)
     {
         if (tenorNameNode.Attributes["href"] != null || tenorNameNode.Attributes["id"] != null) 
         {
             if (tenorNameNode.Attributes["id"] != null) 
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(tenorNameNode);
                 IDManager.SetID(tenorNameIDRef_, ob);
             }
             else if (tenorNameNode.Attributes["href"] != null)
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["href"].Value;
             }
             else
             {
                 tenorName_ = new XsdTypeBoolean(tenorNameNode);
             }
         }
         else
         {
             tenorName_ = new XsdTypeBoolean(tenorNameNode);
         }
     }
     
 
     XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");
     
     if (tenorPeriodNode != null)
     {
         if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null) 
         {
             if (tenorPeriodNode.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                 Period ob = new Period(tenorPeriodNode);
                 IDManager.SetID(tenorPeriodIDRef_, ob);
             }
             else if (tenorPeriodNode.Attributes["href"] != null)
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 tenorPeriod_ = new Period(tenorPeriodNode);
             }
         }
         else
         {
             tenorPeriod_ = new Period(tenorPeriodNode);
         }
     }
     
 
     XmlNode valueDateNode = xmlNode.SelectSingleNode("valueDate");
     
     if (valueDateNode != null)
     {
         if (valueDateNode.Attributes["href"] != null || valueDateNode.Attributes["id"] != null) 
         {
             if (valueDateNode.Attributes["id"] != null) 
             {
                 valueDateIDRef_ = valueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(valueDateNode);
                 IDManager.SetID(valueDateIDRef_, ob);
             }
             else if (valueDateNode.Attributes["href"] != null)
             {
                 valueDateIDRef_ = valueDateNode.Attributes["href"].Value;
             }
             else
             {
                 valueDate_ = new XsdTypeDate(valueDateNode);
             }
         }
         else
         {
             valueDate_ = new XsdTypeDate(valueDateNode);
         }
     }
     
 
     XmlNode currency1ValueDateNode = xmlNode.SelectSingleNode("currency1ValueDate");
     
     if (currency1ValueDateNode != null)
     {
         if (currency1ValueDateNode.Attributes["href"] != null || currency1ValueDateNode.Attributes["id"] != null) 
         {
             if (currency1ValueDateNode.Attributes["id"] != null) 
             {
                 currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(currency1ValueDateNode);
                 IDManager.SetID(currency1ValueDateIDRef_, ob);
             }
             else if (currency1ValueDateNode.Attributes["href"] != null)
             {
                 currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["href"].Value;
             }
             else
             {
                 currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
             }
         }
         else
         {
             currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
         }
     }
     
 
     XmlNode currency2ValueDateNode = xmlNode.SelectSingleNode("currency2ValueDate");
     
     if (currency2ValueDateNode != null)
     {
         if (currency2ValueDateNode.Attributes["href"] != null || currency2ValueDateNode.Attributes["id"] != null) 
         {
             if (currency2ValueDateNode.Attributes["id"] != null) 
             {
                 currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(currency2ValueDateNode);
                 IDManager.SetID(currency2ValueDateIDRef_, ob);
             }
             else if (currency2ValueDateNode.Attributes["href"] != null)
             {
                 currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["href"].Value;
             }
             else
             {
                 currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
             }
         }
         else
         {
             currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
         }
     }
     
 
     XmlNode exchangeRateNode = xmlNode.SelectSingleNode("exchangeRate");
     
     if (exchangeRateNode != null)
     {
         if (exchangeRateNode.Attributes["href"] != null || exchangeRateNode.Attributes["id"] != null) 
         {
             if (exchangeRateNode.Attributes["id"] != null) 
             {
                 exchangeRateIDRef_ = exchangeRateNode.Attributes["id"].Value;
                 ExchangeRate ob = new ExchangeRate(exchangeRateNode);
                 IDManager.SetID(exchangeRateIDRef_, ob);
             }
             else if (exchangeRateNode.Attributes["href"] != null)
             {
                 exchangeRateIDRef_ = exchangeRateNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeRate_ = new ExchangeRate(exchangeRateNode);
             }
         }
         else
         {
             exchangeRate_ = new ExchangeRate(exchangeRateNode);
         }
     }
     
 
     XmlNode nonDeliverableSettlementNode = xmlNode.SelectSingleNode("nonDeliverableSettlement");
     
     if (nonDeliverableSettlementNode != null)
     {
         if (nonDeliverableSettlementNode.Attributes["href"] != null || nonDeliverableSettlementNode.Attributes["id"] != null) 
         {
             if (nonDeliverableSettlementNode.Attributes["id"] != null) 
             {
                 nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["id"].Value;
                 FxCashSettlement ob = new FxCashSettlement(nonDeliverableSettlementNode);
                 IDManager.SetID(nonDeliverableSettlementIDRef_, ob);
             }
             else if (nonDeliverableSettlementNode.Attributes["href"] != null)
             {
                 nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
             }
         }
         else
         {
             nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
         }
     }
     
 
 }
示例#11
0
        public FxSwapLeg(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode tradeIdentifierReferenceNode = xmlNode.SelectSingleNode("tradeIdentifierReference");

            if (tradeIdentifierReferenceNode != null)
            {
                if (tradeIdentifierReferenceNode.Attributes["href"] != null || tradeIdentifierReferenceNode.Attributes["id"] != null)
                {
                    if (tradeIdentifierReferenceNode.Attributes["id"] != null)
                    {
                        tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["id"].Value;
                        PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                        IDManager.SetID(tradeIdentifierReferenceIDRef_, ob);
                    }
                    else if (tradeIdentifierReferenceNode.Attributes["href"] != null)
                    {
                        tradeIdentifierReferenceIDRef_ = tradeIdentifierReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                    }
                }
                else
                {
                    tradeIdentifierReference_ = new PartyTradeIdentifierReference(tradeIdentifierReferenceNode);
                }
            }


            XmlNode exchangedCurrency1Node = xmlNode.SelectSingleNode("exchangedCurrency1");

            if (exchangedCurrency1Node != null)
            {
                if (exchangedCurrency1Node.Attributes["href"] != null || exchangedCurrency1Node.Attributes["id"] != null)
                {
                    if (exchangedCurrency1Node.Attributes["id"] != null)
                    {
                        exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["id"].Value;
                        Payment ob = new Payment(exchangedCurrency1Node);
                        IDManager.SetID(exchangedCurrency1IDRef_, ob);
                    }
                    else if (exchangedCurrency1Node.Attributes["href"] != null)
                    {
                        exchangedCurrency1IDRef_ = exchangedCurrency1Node.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
                    }
                }
                else
                {
                    exchangedCurrency1_ = new Payment(exchangedCurrency1Node);
                }
            }


            XmlNode exchangedCurrency2Node = xmlNode.SelectSingleNode("exchangedCurrency2");

            if (exchangedCurrency2Node != null)
            {
                if (exchangedCurrency2Node.Attributes["href"] != null || exchangedCurrency2Node.Attributes["id"] != null)
                {
                    if (exchangedCurrency2Node.Attributes["id"] != null)
                    {
                        exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["id"].Value;
                        Payment ob = new Payment(exchangedCurrency2Node);
                        IDManager.SetID(exchangedCurrency2IDRef_, ob);
                    }
                    else if (exchangedCurrency2Node.Attributes["href"] != null)
                    {
                        exchangedCurrency2IDRef_ = exchangedCurrency2Node.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
                    }
                }
                else
                {
                    exchangedCurrency2_ = new Payment(exchangedCurrency2Node);
                }
            }


            XmlNode dealtCurrencyNode = xmlNode.SelectSingleNode("dealtCurrency");

            if (dealtCurrencyNode != null)
            {
                if (dealtCurrencyNode.Attributes["href"] != null || dealtCurrencyNode.Attributes["id"] != null)
                {
                    if (dealtCurrencyNode.Attributes["id"] != null)
                    {
                        dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["id"].Value;
                        DealtCurrencyEnum ob = new DealtCurrencyEnum(dealtCurrencyNode);
                        IDManager.SetID(dealtCurrencyIDRef_, ob);
                    }
                    else if (dealtCurrencyNode.Attributes["href"] != null)
                    {
                        dealtCurrencyIDRef_ = dealtCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
                    }
                }
                else
                {
                    dealtCurrency_ = new DealtCurrencyEnum(dealtCurrencyNode);
                }
            }


            XmlNode tenorNameNode = xmlNode.SelectSingleNode("tenorName");

            if (tenorNameNode != null)
            {
                if (tenorNameNode.Attributes["href"] != null || tenorNameNode.Attributes["id"] != null)
                {
                    if (tenorNameNode.Attributes["id"] != null)
                    {
                        tenorNameIDRef_ = tenorNameNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(tenorNameNode);
                        IDManager.SetID(tenorNameIDRef_, ob);
                    }
                    else if (tenorNameNode.Attributes["href"] != null)
                    {
                        tenorNameIDRef_ = tenorNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tenorName_ = new XsdTypeBoolean(tenorNameNode);
                    }
                }
                else
                {
                    tenorName_ = new XsdTypeBoolean(tenorNameNode);
                }
            }


            XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");

            if (tenorPeriodNode != null)
            {
                if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null)
                {
                    if (tenorPeriodNode.Attributes["id"] != null)
                    {
                        tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                        Period ob = new Period(tenorPeriodNode);
                        IDManager.SetID(tenorPeriodIDRef_, ob);
                    }
                    else if (tenorPeriodNode.Attributes["href"] != null)
                    {
                        tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tenorPeriod_ = new Period(tenorPeriodNode);
                    }
                }
                else
                {
                    tenorPeriod_ = new Period(tenorPeriodNode);
                }
            }


            XmlNode valueDateNode = xmlNode.SelectSingleNode("valueDate");

            if (valueDateNode != null)
            {
                if (valueDateNode.Attributes["href"] != null || valueDateNode.Attributes["id"] != null)
                {
                    if (valueDateNode.Attributes["id"] != null)
                    {
                        valueDateIDRef_ = valueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(valueDateNode);
                        IDManager.SetID(valueDateIDRef_, ob);
                    }
                    else if (valueDateNode.Attributes["href"] != null)
                    {
                        valueDateIDRef_ = valueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valueDate_ = new XsdTypeDate(valueDateNode);
                    }
                }
                else
                {
                    valueDate_ = new XsdTypeDate(valueDateNode);
                }
            }


            XmlNode currency1ValueDateNode = xmlNode.SelectSingleNode("currency1ValueDate");

            if (currency1ValueDateNode != null)
            {
                if (currency1ValueDateNode.Attributes["href"] != null || currency1ValueDateNode.Attributes["id"] != null)
                {
                    if (currency1ValueDateNode.Attributes["id"] != null)
                    {
                        currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(currency1ValueDateNode);
                        IDManager.SetID(currency1ValueDateIDRef_, ob);
                    }
                    else if (currency1ValueDateNode.Attributes["href"] != null)
                    {
                        currency1ValueDateIDRef_ = currency1ValueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
                    }
                }
                else
                {
                    currency1ValueDate_ = new XsdTypeDate(currency1ValueDateNode);
                }
            }


            XmlNode currency2ValueDateNode = xmlNode.SelectSingleNode("currency2ValueDate");

            if (currency2ValueDateNode != null)
            {
                if (currency2ValueDateNode.Attributes["href"] != null || currency2ValueDateNode.Attributes["id"] != null)
                {
                    if (currency2ValueDateNode.Attributes["id"] != null)
                    {
                        currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(currency2ValueDateNode);
                        IDManager.SetID(currency2ValueDateIDRef_, ob);
                    }
                    else if (currency2ValueDateNode.Attributes["href"] != null)
                    {
                        currency2ValueDateIDRef_ = currency2ValueDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
                    }
                }
                else
                {
                    currency2ValueDate_ = new XsdTypeDate(currency2ValueDateNode);
                }
            }


            XmlNode exchangeRateNode = xmlNode.SelectSingleNode("exchangeRate");

            if (exchangeRateNode != null)
            {
                if (exchangeRateNode.Attributes["href"] != null || exchangeRateNode.Attributes["id"] != null)
                {
                    if (exchangeRateNode.Attributes["id"] != null)
                    {
                        exchangeRateIDRef_ = exchangeRateNode.Attributes["id"].Value;
                        ExchangeRate ob = new ExchangeRate(exchangeRateNode);
                        IDManager.SetID(exchangeRateIDRef_, ob);
                    }
                    else if (exchangeRateNode.Attributes["href"] != null)
                    {
                        exchangeRateIDRef_ = exchangeRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeRate_ = new ExchangeRate(exchangeRateNode);
                    }
                }
                else
                {
                    exchangeRate_ = new ExchangeRate(exchangeRateNode);
                }
            }


            XmlNode nonDeliverableSettlementNode = xmlNode.SelectSingleNode("nonDeliverableSettlement");

            if (nonDeliverableSettlementNode != null)
            {
                if (nonDeliverableSettlementNode.Attributes["href"] != null || nonDeliverableSettlementNode.Attributes["id"] != null)
                {
                    if (nonDeliverableSettlementNode.Attributes["id"] != null)
                    {
                        nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["id"].Value;
                        FxCashSettlement ob = new FxCashSettlement(nonDeliverableSettlementNode);
                        IDManager.SetID(nonDeliverableSettlementIDRef_, ob);
                    }
                    else if (nonDeliverableSettlementNode.Attributes["href"] != null)
                    {
                        nonDeliverableSettlementIDRef_ = nonDeliverableSettlementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
                    }
                }
                else
                {
                    nonDeliverableSettlement_ = new FxCashSettlement(nonDeliverableSettlementNode);
                }
            }
        }