public ExerciseFeeSchedule(XmlNode xmlNode)
 {
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList notionalReferenceNodeList = xmlNode.SelectNodes("notionalReference");
     if (notionalReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalReferenceIDRef = item.Attributes["id"].Name;
                 ScheduleReference ob = ScheduleReference();
                 IDManager.SetID(notionalReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalReference = new ScheduleReference(item);
             }
         }
     }
     
 
     XmlNodeList feeAmountScheduleNodeList = xmlNode.SelectNodes("feeAmountSchedule");
     if (feeAmountScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeAmountScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeAmountScheduleIDRef = item.Attributes["id"].Name;
                 AmountSchedule ob = AmountSchedule();
                 IDManager.SetID(feeAmountScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeAmountScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeAmountSchedule = new AmountSchedule(item);
             }
         }
     }
     
 
     XmlNodeList feeRateScheduleNodeList = xmlNode.SelectNodes("feeRateSchedule");
     if (feeRateScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeRateScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeRateScheduleIDRef = item.Attributes["id"].Name;
                 Schedule ob = Schedule();
                 IDManager.SetID(feeRateScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeRateScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeRateSchedule = new Schedule(item);
             }
         }
     }
     
 
     XmlNodeList feePaymentDateNodeList = xmlNode.SelectNodes("feePaymentDate");
     if (feePaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feePaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feePaymentDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(feePaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feePaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feePaymentDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
 }
 public FloatingRate(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList floatingRateIndexNodeList = xmlNode.SelectNodes("floatingRateIndex");
     if (floatingRateIndexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateIndexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef = item.Attributes["id"].Name;
                 FloatingRateIndex ob = FloatingRateIndex();
                 IDManager.SetID(floatingRateIndexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIndexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateIndex = new FloatingRateIndex(item);
             }
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     if (indexTenorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexTenor = new Period(item);
             }
         }
     }
     
 
     XmlNodeList floatingRateMultiplierScheduleNodeList = xmlNode.SelectNodes("floatingRateMultiplierSchedule");
     if (floatingRateMultiplierScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateMultiplierScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateMultiplierScheduleIDRef = item.Attributes["id"].Name;
                 Schedule ob = Schedule();
                 IDManager.SetID(floatingRateMultiplierScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateMultiplierScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateMultiplierSchedule = new Schedule(item);
             }
         }
     }
     
 
     XmlNodeList spreadScheduleNodeList = xmlNode.SelectNodes("spreadSchedule");
     
     foreach (XmlNode item in spreadScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 spreadScheduleIDRef = item.Attributes["id"].Name;
                 List<SpreadSchedule> ob = new List<SpreadSchedule>();
                 ob.Add(new SpreadSchedule(item));
                 IDManager.SetID(spreadScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 spreadScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             spreadSchedule.Add(new SpreadSchedule(item));
             }
         }
     }
     
 
     XmlNodeList rateTreatmentNodeList = xmlNode.SelectNodes("rateTreatment");
     if (rateTreatmentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateTreatmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateTreatmentIDRef = item.Attributes["id"].Name;
                 RateTreatmentEnum ob = RateTreatmentEnum();
                 IDManager.SetID(rateTreatmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateTreatmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateTreatment = new RateTreatmentEnum(item);
             }
         }
     }
     
 
     XmlNodeList capRateScheduleNodeList = xmlNode.SelectNodes("capRateSchedule");
     
     foreach (XmlNode item in capRateScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 capRateScheduleIDRef = item.Attributes["id"].Name;
                 List<StrikeSchedule> ob = new List<StrikeSchedule>();
                 ob.Add(new StrikeSchedule(item));
                 IDManager.SetID(capRateScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 capRateScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             capRateSchedule.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
     XmlNodeList floorRateScheduleNodeList = xmlNode.SelectNodes("floorRateSchedule");
     
     foreach (XmlNode item in floorRateScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floorRateScheduleIDRef = item.Attributes["id"].Name;
                 List<StrikeSchedule> ob = new List<StrikeSchedule>();
                 ob.Add(new StrikeSchedule(item));
                 IDManager.SetID(floorRateScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floorRateScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
             floorRateSchedule.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
 }
 public TradeUnderlyer2(XmlNode xmlNode)
 {
     XmlNodeList floatingRateNodeList = xmlNode.SelectNodes("floatingRate");
     if (floatingRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIDRef = item.Attributes["id"].Name;
                 FloatingRate ob = FloatingRate();
                 IDManager.SetID(floatingRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRate = new FloatingRate(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");
     if (fixedRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateIDRef = item.Attributes["id"].Name;
                 Schedule ob = Schedule();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new Schedule(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 quotedCurrencyPairNodeList = xmlNode.SelectNodes("quotedCurrencyPair");
     if (quotedCurrencyPairNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotedCurrencyPairNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef = item.Attributes["id"].Name;
                 QuotedCurrencyPair ob = QuotedCurrencyPair();
                 IDManager.SetID(quotedCurrencyPairIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotedCurrencyPairIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotedCurrencyPair = new QuotedCurrencyPair(item);
             }
         }
     }
     
 
     XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity");
     if (referenceEntityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceEntityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceEntityIDRef = item.Attributes["id"].Name;
                 LegalEntity ob = LegalEntity();
                 IDManager.SetID(referenceEntityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceEntityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceEntity = new LegalEntity(item);
             }
         }
     }
     
 
     XmlNodeList payerPartyReferenceNodeList = xmlNode.SelectNodes("payerPartyReference");
     if (payerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(payerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList payerAccountReferenceNodeList = xmlNode.SelectNodes("payerAccountReference");
     if (payerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(payerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverPartyReferenceNodeList = xmlNode.SelectNodes("receiverPartyReference");
     if (receiverPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(receiverPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList receiverAccountReferenceNodeList = xmlNode.SelectNodes("receiverAccountReference");
     if (receiverAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in receiverAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(receiverAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 receiverAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 receiverAccountReference = new AccountReference(item);
             }
         }
     }
     
 
 }
 public Calculation(XmlNode xmlNode)
 {
     XmlNode notionalScheduleNode = xmlNode.SelectSingleNode("notionalSchedule");
     
     if (notionalScheduleNode != null)
     {
         if (notionalScheduleNode.Attributes["href"] != null || notionalScheduleNode.Attributes["id"] != null) 
         {
             if (notionalScheduleNode.Attributes["id"] != null) 
             {
                 notionalScheduleIDRef_ = notionalScheduleNode.Attributes["id"].Value;
                 Notional ob = new Notional(notionalScheduleNode);
                 IDManager.SetID(notionalScheduleIDRef_, ob);
             }
             else if (notionalScheduleNode.Attributes["href"] != null)
             {
                 notionalScheduleIDRef_ = notionalScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 notionalSchedule_ = new Notional(notionalScheduleNode);
             }
         }
         else
         {
             notionalSchedule_ = new Notional(notionalScheduleNode);
         }
     }
     
 
     XmlNode fxLinkedNotionalScheduleNode = xmlNode.SelectSingleNode("fxLinkedNotionalSchedule");
     
     if (fxLinkedNotionalScheduleNode != null)
     {
         if (fxLinkedNotionalScheduleNode.Attributes["href"] != null || fxLinkedNotionalScheduleNode.Attributes["id"] != null) 
         {
             if (fxLinkedNotionalScheduleNode.Attributes["id"] != null) 
             {
                 fxLinkedNotionalScheduleIDRef_ = fxLinkedNotionalScheduleNode.Attributes["id"].Value;
                 FxLinkedNotionalSchedule ob = new FxLinkedNotionalSchedule(fxLinkedNotionalScheduleNode);
                 IDManager.SetID(fxLinkedNotionalScheduleIDRef_, ob);
             }
             else if (fxLinkedNotionalScheduleNode.Attributes["href"] != null)
             {
                 fxLinkedNotionalScheduleIDRef_ = fxLinkedNotionalScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 fxLinkedNotionalSchedule_ = new FxLinkedNotionalSchedule(fxLinkedNotionalScheduleNode);
             }
         }
         else
         {
             fxLinkedNotionalSchedule_ = new FxLinkedNotionalSchedule(fxLinkedNotionalScheduleNode);
         }
     }
     
 
     XmlNode fixedRateScheduleNode = xmlNode.SelectSingleNode("fixedRateSchedule");
     
     if (fixedRateScheduleNode != null)
     {
         if (fixedRateScheduleNode.Attributes["href"] != null || fixedRateScheduleNode.Attributes["id"] != null) 
         {
             if (fixedRateScheduleNode.Attributes["id"] != null) 
             {
                 fixedRateScheduleIDRef_ = fixedRateScheduleNode.Attributes["id"].Value;
                 Schedule ob = new Schedule(fixedRateScheduleNode);
                 IDManager.SetID(fixedRateScheduleIDRef_, ob);
             }
             else if (fixedRateScheduleNode.Attributes["href"] != null)
             {
                 fixedRateScheduleIDRef_ = fixedRateScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRateSchedule_ = new Schedule(fixedRateScheduleNode);
             }
         }
         else
         {
             fixedRateSchedule_ = new Schedule(fixedRateScheduleNode);
         }
     }
     
 
     XmlNode futureValueNotionalNode = xmlNode.SelectSingleNode("futureValueNotional");
     
     if (futureValueNotionalNode != null)
     {
         if (futureValueNotionalNode.Attributes["href"] != null || futureValueNotionalNode.Attributes["id"] != null) 
         {
             if (futureValueNotionalNode.Attributes["id"] != null) 
             {
                 futureValueNotionalIDRef_ = futureValueNotionalNode.Attributes["id"].Value;
                 FutureValueAmount ob = new FutureValueAmount(futureValueNotionalNode);
                 IDManager.SetID(futureValueNotionalIDRef_, ob);
             }
             else if (futureValueNotionalNode.Attributes["href"] != null)
             {
                 futureValueNotionalIDRef_ = futureValueNotionalNode.Attributes["href"].Value;
             }
             else
             {
                 futureValueNotional_ = new FutureValueAmount(futureValueNotionalNode);
             }
         }
         else
         {
             futureValueNotional_ = new FutureValueAmount(futureValueNotionalNode);
         }
     }
     
 
     XmlNode rateCalculationNode = xmlNode.SelectSingleNode("rateCalculation");
     
     if (rateCalculationNode != null)
     {
         if (rateCalculationNode.Attributes["href"] != null || rateCalculationNode.Attributes["id"] != null) 
         {
             if (rateCalculationNode.Attributes["id"] != null) 
             {
                 rateCalculationIDRef_ = rateCalculationNode.Attributes["id"].Value;
                 Rate ob = new Rate(rateCalculationNode);
                 IDManager.SetID(rateCalculationIDRef_, ob);
             }
             else if (rateCalculationNode.Attributes["href"] != null)
             {
                 rateCalculationIDRef_ = rateCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 rateCalculation_ = new Rate(rateCalculationNode);
             }
         }
         else
         {
             rateCalculation_ = new Rate(rateCalculationNode);
         }
     }
     
 
     XmlNode floatingRateCalculationNode = xmlNode.SelectSingleNode("floatingRateCalculation");
     
     if (floatingRateCalculationNode != null)
     {
         if (floatingRateCalculationNode.Attributes["href"] != null || floatingRateCalculationNode.Attributes["id"] != null) 
         {
             if (floatingRateCalculationNode.Attributes["id"] != null) 
             {
                 floatingRateCalculationIDRef_ = floatingRateCalculationNode.Attributes["id"].Value;
                 FloatingRateCalculation ob = new FloatingRateCalculation(floatingRateCalculationNode);
                 IDManager.SetID(floatingRateCalculationIDRef_, ob);
             }
             else if (floatingRateCalculationNode.Attributes["href"] != null)
             {
                 floatingRateCalculationIDRef_ = floatingRateCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateCalculation_ = new FloatingRateCalculation(floatingRateCalculationNode);
             }
         }
         else
         {
             floatingRateCalculation_ = new FloatingRateCalculation(floatingRateCalculationNode);
         }
     }
     
 
     XmlNode inflationRateCalculationNode = xmlNode.SelectSingleNode("inflationRateCalculation");
     
     if (inflationRateCalculationNode != null)
     {
         if (inflationRateCalculationNode.Attributes["href"] != null || inflationRateCalculationNode.Attributes["id"] != null) 
         {
             if (inflationRateCalculationNode.Attributes["id"] != null) 
             {
                 inflationRateCalculationIDRef_ = inflationRateCalculationNode.Attributes["id"].Value;
                 InflationRateCalculation ob = new InflationRateCalculation(inflationRateCalculationNode);
                 IDManager.SetID(inflationRateCalculationIDRef_, ob);
             }
             else if (inflationRateCalculationNode.Attributes["href"] != null)
             {
                 inflationRateCalculationIDRef_ = inflationRateCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 inflationRateCalculation_ = new InflationRateCalculation(inflationRateCalculationNode);
             }
         }
         else
         {
             inflationRateCalculation_ = new InflationRateCalculation(inflationRateCalculationNode);
         }
     }
     
 
     XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");
     
     if (dayCountFractionNode != null)
     {
         if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) 
         {
             if (dayCountFractionNode.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                 DayCountFraction ob = new DayCountFraction(dayCountFractionNode);
                 IDManager.SetID(dayCountFractionIDRef_, ob);
             }
             else if (dayCountFractionNode.Attributes["href"] != null)
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
             }
             else
             {
                 dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
             }
         }
         else
         {
             dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
         }
     }
     
 
     XmlNode discountingNode = xmlNode.SelectSingleNode("discounting");
     
     if (discountingNode != null)
     {
         if (discountingNode.Attributes["href"] != null || discountingNode.Attributes["id"] != null) 
         {
             if (discountingNode.Attributes["id"] != null) 
             {
                 discountingIDRef_ = discountingNode.Attributes["id"].Value;
                 Discounting ob = new Discounting(discountingNode);
                 IDManager.SetID(discountingIDRef_, ob);
             }
             else if (discountingNode.Attributes["href"] != null)
             {
                 discountingIDRef_ = discountingNode.Attributes["href"].Value;
             }
             else
             {
                 discounting_ = new Discounting(discountingNode);
             }
         }
         else
         {
             discounting_ = new Discounting(discountingNode);
         }
     }
     
 
     XmlNode compoundingMethodNode = xmlNode.SelectSingleNode("compoundingMethod");
     
     if (compoundingMethodNode != null)
     {
         if (compoundingMethodNode.Attributes["href"] != null || compoundingMethodNode.Attributes["id"] != null) 
         {
             if (compoundingMethodNode.Attributes["id"] != null) 
             {
                 compoundingMethodIDRef_ = compoundingMethodNode.Attributes["id"].Value;
                 CompoundingMethodEnum ob = new CompoundingMethodEnum(compoundingMethodNode);
                 IDManager.SetID(compoundingMethodIDRef_, ob);
             }
             else if (compoundingMethodNode.Attributes["href"] != null)
             {
                 compoundingMethodIDRef_ = compoundingMethodNode.Attributes["href"].Value;
             }
             else
             {
                 compoundingMethod_ = new CompoundingMethodEnum(compoundingMethodNode);
             }
         }
         else
         {
             compoundingMethod_ = new CompoundingMethodEnum(compoundingMethodNode);
         }
     }
     
 
 }
 public TradeUnderlyer2(XmlNode xmlNode)
 {
     XmlNode floatingRateNode = xmlNode.SelectSingleNode("floatingRate");
     
     if (floatingRateNode != null)
     {
         if (floatingRateNode.Attributes["href"] != null || floatingRateNode.Attributes["id"] != null) 
         {
             if (floatingRateNode.Attributes["id"] != null) 
             {
                 floatingRateIDRef_ = floatingRateNode.Attributes["id"].Value;
                 FloatingRate ob = new FloatingRate(floatingRateNode);
                 IDManager.SetID(floatingRateIDRef_, ob);
             }
             else if (floatingRateNode.Attributes["href"] != null)
             {
                 floatingRateIDRef_ = floatingRateNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRate_ = new FloatingRate(floatingRateNode);
             }
         }
         else
         {
             floatingRate_ = new FloatingRate(floatingRateNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 Schedule ob = new Schedule(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new Schedule(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new Schedule(fixedRateNode);
         }
     }
     
 
     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 quotedCurrencyPairNode = xmlNode.SelectSingleNode("quotedCurrencyPair");
     
     if (quotedCurrencyPairNode != null)
     {
         if (quotedCurrencyPairNode.Attributes["href"] != null || quotedCurrencyPairNode.Attributes["id"] != null) 
         {
             if (quotedCurrencyPairNode.Attributes["id"] != null) 
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["id"].Value;
                 QuotedCurrencyPair ob = new QuotedCurrencyPair(quotedCurrencyPairNode);
                 IDManager.SetID(quotedCurrencyPairIDRef_, ob);
             }
             else if (quotedCurrencyPairNode.Attributes["href"] != null)
             {
                 quotedCurrencyPairIDRef_ = quotedCurrencyPairNode.Attributes["href"].Value;
             }
             else
             {
                 quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
             }
         }
         else
         {
             quotedCurrencyPair_ = new QuotedCurrencyPair(quotedCurrencyPairNode);
         }
     }
     
 
     XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity");
     
     if (referenceEntityNode != null)
     {
         if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null) 
         {
             if (referenceEntityNode.Attributes["id"] != null) 
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value;
                 LegalEntity ob = new LegalEntity(referenceEntityNode);
                 IDManager.SetID(referenceEntityIDRef_, ob);
             }
             else if (referenceEntityNode.Attributes["href"] != null)
             {
                 referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value;
             }
             else
             {
                 referenceEntity_ = new LegalEntity(referenceEntityNode);
             }
         }
         else
         {
             referenceEntity_ = new LegalEntity(referenceEntityNode);
         }
     }
     
 
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
 }
 public FloatingRate(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode floatingRateIndexNode = xmlNode.SelectSingleNode("floatingRateIndex");
     
     if (floatingRateIndexNode != null)
     {
         if (floatingRateIndexNode.Attributes["href"] != null || floatingRateIndexNode.Attributes["id"] != null) 
         {
             if (floatingRateIndexNode.Attributes["id"] != null) 
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["id"].Value;
                 FloatingRateIndex ob = new FloatingRateIndex(floatingRateIndexNode);
                 IDManager.SetID(floatingRateIndexIDRef_, ob);
             }
             else if (floatingRateIndexNode.Attributes["href"] != null)
             {
                 floatingRateIndexIDRef_ = floatingRateIndexNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
             }
         }
         else
         {
             floatingRateIndex_ = new FloatingRateIndex(floatingRateIndexNode);
         }
     }
     
 
     XmlNode indexTenorNode = xmlNode.SelectSingleNode("indexTenor");
     
     if (indexTenorNode != null)
     {
         if (indexTenorNode.Attributes["href"] != null || indexTenorNode.Attributes["id"] != null) 
         {
             if (indexTenorNode.Attributes["id"] != null) 
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["id"].Value;
                 Period ob = new Period(indexTenorNode);
                 IDManager.SetID(indexTenorIDRef_, ob);
             }
             else if (indexTenorNode.Attributes["href"] != null)
             {
                 indexTenorIDRef_ = indexTenorNode.Attributes["href"].Value;
             }
             else
             {
                 indexTenor_ = new Period(indexTenorNode);
             }
         }
         else
         {
             indexTenor_ = new Period(indexTenorNode);
         }
     }
     
 
     XmlNode floatingRateMultiplierScheduleNode = xmlNode.SelectSingleNode("floatingRateMultiplierSchedule");
     
     if (floatingRateMultiplierScheduleNode != null)
     {
         if (floatingRateMultiplierScheduleNode.Attributes["href"] != null || floatingRateMultiplierScheduleNode.Attributes["id"] != null) 
         {
             if (floatingRateMultiplierScheduleNode.Attributes["id"] != null) 
             {
                 floatingRateMultiplierScheduleIDRef_ = floatingRateMultiplierScheduleNode.Attributes["id"].Value;
                 Schedule ob = new Schedule(floatingRateMultiplierScheduleNode);
                 IDManager.SetID(floatingRateMultiplierScheduleIDRef_, ob);
             }
             else if (floatingRateMultiplierScheduleNode.Attributes["href"] != null)
             {
                 floatingRateMultiplierScheduleIDRef_ = floatingRateMultiplierScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 floatingRateMultiplierSchedule_ = new Schedule(floatingRateMultiplierScheduleNode);
             }
         }
         else
         {
             floatingRateMultiplierSchedule_ = new Schedule(floatingRateMultiplierScheduleNode);
         }
     }
     
 
     XmlNodeList spreadScheduleNodeList = xmlNode.SelectNodes("spreadSchedule");
     
     if (spreadScheduleNodeList != null)
     {
         this.spreadSchedule_ = new List<SpreadSchedule>();
         foreach (XmlNode item in spreadScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     spreadScheduleIDRef_ = item.Attributes["id"].Value;
                     spreadSchedule_.Add(new SpreadSchedule(item));
                     IDManager.SetID(spreadScheduleIDRef_, spreadSchedule_[spreadSchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     spreadScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 spreadSchedule_.Add(new SpreadSchedule(item));
                 }
             }
             else
             {
                 spreadSchedule_.Add(new SpreadSchedule(item));
             }
         }
     }
     
 
     XmlNode rateTreatmentNode = xmlNode.SelectSingleNode("rateTreatment");
     
     if (rateTreatmentNode != null)
     {
         if (rateTreatmentNode.Attributes["href"] != null || rateTreatmentNode.Attributes["id"] != null) 
         {
             if (rateTreatmentNode.Attributes["id"] != null) 
             {
                 rateTreatmentIDRef_ = rateTreatmentNode.Attributes["id"].Value;
                 RateTreatmentEnum ob = new RateTreatmentEnum(rateTreatmentNode);
                 IDManager.SetID(rateTreatmentIDRef_, ob);
             }
             else if (rateTreatmentNode.Attributes["href"] != null)
             {
                 rateTreatmentIDRef_ = rateTreatmentNode.Attributes["href"].Value;
             }
             else
             {
                 rateTreatment_ = new RateTreatmentEnum(rateTreatmentNode);
             }
         }
         else
         {
             rateTreatment_ = new RateTreatmentEnum(rateTreatmentNode);
         }
     }
     
 
     XmlNodeList capRateScheduleNodeList = xmlNode.SelectNodes("capRateSchedule");
     
     if (capRateScheduleNodeList != null)
     {
         this.capRateSchedule_ = new List<StrikeSchedule>();
         foreach (XmlNode item in capRateScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     capRateScheduleIDRef_ = item.Attributes["id"].Value;
                     capRateSchedule_.Add(new StrikeSchedule(item));
                     IDManager.SetID(capRateScheduleIDRef_, capRateSchedule_[capRateSchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     capRateScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 capRateSchedule_.Add(new StrikeSchedule(item));
                 }
             }
             else
             {
                 capRateSchedule_.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
     XmlNodeList floorRateScheduleNodeList = xmlNode.SelectNodes("floorRateSchedule");
     
     if (floorRateScheduleNodeList != null)
     {
         this.floorRateSchedule_ = new List<StrikeSchedule>();
         foreach (XmlNode item in floorRateScheduleNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     floorRateScheduleIDRef_ = item.Attributes["id"].Value;
                     floorRateSchedule_.Add(new StrikeSchedule(item));
                     IDManager.SetID(floorRateScheduleIDRef_, floorRateSchedule_[floorRateSchedule_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     floorRateScheduleIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 floorRateSchedule_.Add(new StrikeSchedule(item));
                 }
             }
             else
             {
                 floorRateSchedule_.Add(new StrikeSchedule(item));
             }
         }
     }
     
 
 }
 public Calculation(XmlNode xmlNode)
 {
     XmlNodeList notionalScheduleNodeList = xmlNode.SelectNodes("notionalSchedule");
     if (notionalScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalScheduleIDRef = item.Attributes["id"].Name;
                 Notional ob = Notional();
                 IDManager.SetID(notionalScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalSchedule = new Notional(item);
             }
         }
     }
     
 
     XmlNodeList fxLinkedNotionalScheduleNodeList = xmlNode.SelectNodes("fxLinkedNotionalSchedule");
     if (fxLinkedNotionalScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxLinkedNotionalScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxLinkedNotionalScheduleIDRef = item.Attributes["id"].Name;
                 FxLinkedNotionalSchedule ob = FxLinkedNotionalSchedule();
                 IDManager.SetID(fxLinkedNotionalScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxLinkedNotionalScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxLinkedNotionalSchedule = new FxLinkedNotionalSchedule(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateScheduleNodeList = xmlNode.SelectNodes("fixedRateSchedule");
     if (fixedRateScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateScheduleIDRef = item.Attributes["id"].Name;
                 Schedule ob = Schedule();
                 IDManager.SetID(fixedRateScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRateSchedule = new Schedule(item);
             }
         }
     }
     
 
     XmlNodeList futureValueNotionalNodeList = xmlNode.SelectNodes("futureValueNotional");
     if (futureValueNotionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futureValueNotionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futureValueNotionalIDRef = item.Attributes["id"].Name;
                 FutureValueAmount ob = FutureValueAmount();
                 IDManager.SetID(futureValueNotionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futureValueNotionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 futureValueNotional = new FutureValueAmount(item);
             }
         }
     }
     
 
     XmlNodeList rateCalculationNodeList = xmlNode.SelectNodes("rateCalculation");
     if (rateCalculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateCalculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateCalculationIDRef = item.Attributes["id"].Name;
                 Rate ob = Rate();
                 IDManager.SetID(rateCalculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateCalculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateCalculation = new Rate(item);
             }
         }
     }
     
 
     XmlNodeList floatingRateCalculationNodeList = xmlNode.SelectNodes("floatingRateCalculation");
     if (floatingRateCalculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateCalculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateCalculationIDRef = item.Attributes["id"].Name;
                 FloatingRateCalculation ob = FloatingRateCalculation();
                 IDManager.SetID(floatingRateCalculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateCalculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateCalculation = new FloatingRateCalculation(item);
             }
         }
     }
     
 
     XmlNodeList inflationRateCalculationNodeList = xmlNode.SelectNodes("inflationRateCalculation");
     if (inflationRateCalculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in inflationRateCalculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 inflationRateCalculationIDRef = item.Attributes["id"].Name;
                 InflationRateCalculation ob = InflationRateCalculation();
                 IDManager.SetID(inflationRateCalculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 inflationRateCalculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 inflationRateCalculation = new InflationRateCalculation(item);
             }
         }
     }
     
 
     XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction");
     if (dayCountFractionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dayCountFractionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef = item.Attributes["id"].Name;
                 DayCountFraction ob = DayCountFraction();
                 IDManager.SetID(dayCountFractionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dayCountFractionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dayCountFraction = new DayCountFraction(item);
             }
         }
     }
     
 
     XmlNodeList discountingNodeList = xmlNode.SelectNodes("discounting");
     if (discountingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in discountingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 discountingIDRef = item.Attributes["id"].Name;
                 Discounting ob = Discounting();
                 IDManager.SetID(discountingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 discountingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 discounting = new Discounting(item);
             }
         }
     }
     
 
     XmlNodeList compoundingMethodNodeList = xmlNode.SelectNodes("compoundingMethod");
     if (compoundingMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in compoundingMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 compoundingMethodIDRef = item.Attributes["id"].Name;
                 CompoundingMethodEnum ob = CompoundingMethodEnum();
                 IDManager.SetID(compoundingMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 compoundingMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 compoundingMethod = new CompoundingMethodEnum(item);
             }
         }
     }
     
 
 }
 public ExerciseFeeSchedule(XmlNode xmlNode)
 {
     XmlNode payerPartyReferenceNode = xmlNode.SelectSingleNode("payerPartyReference");
     
     if (payerPartyReferenceNode != null)
     {
         if (payerPartyReferenceNode.Attributes["href"] != null || payerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (payerPartyReferenceNode.Attributes["id"] != null) 
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(payerPartyReferenceNode);
                 IDManager.SetID(payerPartyReferenceIDRef_, ob);
             }
             else if (payerPartyReferenceNode.Attributes["href"] != null)
             {
                 payerPartyReferenceIDRef_ = payerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
             }
         }
         else
         {
             payerPartyReference_ = new PartyReference(payerPartyReferenceNode);
         }
     }
     
 
     XmlNode payerAccountReferenceNode = xmlNode.SelectSingleNode("payerAccountReference");
     
     if (payerAccountReferenceNode != null)
     {
         if (payerAccountReferenceNode.Attributes["href"] != null || payerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (payerAccountReferenceNode.Attributes["id"] != null) 
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(payerAccountReferenceNode);
                 IDManager.SetID(payerAccountReferenceIDRef_, ob);
             }
             else if (payerAccountReferenceNode.Attributes["href"] != null)
             {
                 payerAccountReferenceIDRef_ = payerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
             }
         }
         else
         {
             payerAccountReference_ = new AccountReference(payerAccountReferenceNode);
         }
     }
     
 
     XmlNode receiverPartyReferenceNode = xmlNode.SelectSingleNode("receiverPartyReference");
     
     if (receiverPartyReferenceNode != null)
     {
         if (receiverPartyReferenceNode.Attributes["href"] != null || receiverPartyReferenceNode.Attributes["id"] != null) 
         {
             if (receiverPartyReferenceNode.Attributes["id"] != null) 
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(receiverPartyReferenceNode);
                 IDManager.SetID(receiverPartyReferenceIDRef_, ob);
             }
             else if (receiverPartyReferenceNode.Attributes["href"] != null)
             {
                 receiverPartyReferenceIDRef_ = receiverPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
             }
         }
         else
         {
             receiverPartyReference_ = new PartyReference(receiverPartyReferenceNode);
         }
     }
     
 
     XmlNode receiverAccountReferenceNode = xmlNode.SelectSingleNode("receiverAccountReference");
     
     if (receiverAccountReferenceNode != null)
     {
         if (receiverAccountReferenceNode.Attributes["href"] != null || receiverAccountReferenceNode.Attributes["id"] != null) 
         {
             if (receiverAccountReferenceNode.Attributes["id"] != null) 
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(receiverAccountReferenceNode);
                 IDManager.SetID(receiverAccountReferenceIDRef_, ob);
             }
             else if (receiverAccountReferenceNode.Attributes["href"] != null)
             {
                 receiverAccountReferenceIDRef_ = receiverAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
             }
         }
         else
         {
             receiverAccountReference_ = new AccountReference(receiverAccountReferenceNode);
         }
     }
     
 
     XmlNode notionalReferenceNode = xmlNode.SelectSingleNode("notionalReference");
     
     if (notionalReferenceNode != null)
     {
         if (notionalReferenceNode.Attributes["href"] != null || notionalReferenceNode.Attributes["id"] != null) 
         {
             if (notionalReferenceNode.Attributes["id"] != null) 
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["id"].Value;
                 ScheduleReference ob = new ScheduleReference(notionalReferenceNode);
                 IDManager.SetID(notionalReferenceIDRef_, ob);
             }
             else if (notionalReferenceNode.Attributes["href"] != null)
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 notionalReference_ = new ScheduleReference(notionalReferenceNode);
             }
         }
         else
         {
             notionalReference_ = new ScheduleReference(notionalReferenceNode);
         }
     }
     
 
     XmlNode feeAmountScheduleNode = xmlNode.SelectSingleNode("feeAmountSchedule");
     
     if (feeAmountScheduleNode != null)
     {
         if (feeAmountScheduleNode.Attributes["href"] != null || feeAmountScheduleNode.Attributes["id"] != null) 
         {
             if (feeAmountScheduleNode.Attributes["id"] != null) 
             {
                 feeAmountScheduleIDRef_ = feeAmountScheduleNode.Attributes["id"].Value;
                 AmountSchedule ob = new AmountSchedule(feeAmountScheduleNode);
                 IDManager.SetID(feeAmountScheduleIDRef_, ob);
             }
             else if (feeAmountScheduleNode.Attributes["href"] != null)
             {
                 feeAmountScheduleIDRef_ = feeAmountScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 feeAmountSchedule_ = new AmountSchedule(feeAmountScheduleNode);
             }
         }
         else
         {
             feeAmountSchedule_ = new AmountSchedule(feeAmountScheduleNode);
         }
     }
     
 
     XmlNode feeRateScheduleNode = xmlNode.SelectSingleNode("feeRateSchedule");
     
     if (feeRateScheduleNode != null)
     {
         if (feeRateScheduleNode.Attributes["href"] != null || feeRateScheduleNode.Attributes["id"] != null) 
         {
             if (feeRateScheduleNode.Attributes["id"] != null) 
             {
                 feeRateScheduleIDRef_ = feeRateScheduleNode.Attributes["id"].Value;
                 Schedule ob = new Schedule(feeRateScheduleNode);
                 IDManager.SetID(feeRateScheduleIDRef_, ob);
             }
             else if (feeRateScheduleNode.Attributes["href"] != null)
             {
                 feeRateScheduleIDRef_ = feeRateScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 feeRateSchedule_ = new Schedule(feeRateScheduleNode);
             }
         }
         else
         {
             feeRateSchedule_ = new Schedule(feeRateScheduleNode);
         }
     }
     
 
     XmlNode feePaymentDateNode = xmlNode.SelectSingleNode("feePaymentDate");
     
     if (feePaymentDateNode != null)
     {
         if (feePaymentDateNode.Attributes["href"] != null || feePaymentDateNode.Attributes["id"] != null) 
         {
             if (feePaymentDateNode.Attributes["id"] != null) 
             {
                 feePaymentDateIDRef_ = feePaymentDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(feePaymentDateNode);
                 IDManager.SetID(feePaymentDateIDRef_, ob);
             }
             else if (feePaymentDateNode.Attributes["href"] != null)
             {
                 feePaymentDateIDRef_ = feePaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 feePaymentDate_ = new RelativeDateOffset(feePaymentDateNode);
             }
         }
         else
         {
             feePaymentDate_ = new RelativeDateOffset(feePaymentDateNode);
         }
     }
     
 
 }