public FixedPaymentAmount(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode paymentAmountNode = xmlNode.SelectSingleNode("paymentAmount");
     
     if (paymentAmountNode != null)
     {
         if (paymentAmountNode.Attributes["href"] != null || paymentAmountNode.Attributes["id"] != null) 
         {
             if (paymentAmountNode.Attributes["id"] != null) 
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(paymentAmountNode);
                 IDManager.SetID(paymentAmountIDRef_, ob);
             }
             else if (paymentAmountNode.Attributes["href"] != null)
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
             }
         }
         else
         {
             paymentAmount_ = new NonNegativeMoney(paymentAmountNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new RelativeDateOffset(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new RelativeDateOffset(paymentDateNode);
         }
     }
     
 
 }
 public FixedPaymentAmount(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList paymentAmountNodeList = xmlNode.SelectNodes("paymentAmount");
     if (paymentAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(paymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
 }
 public AdjustableDatesOrRelativeDateOffset(XmlNode xmlNode)
 {
     XmlNode adjustableDatesNode = xmlNode.SelectSingleNode("adjustableDates");
     
     if (adjustableDatesNode != null)
     {
         if (adjustableDatesNode.Attributes["href"] != null || adjustableDatesNode.Attributes["id"] != null) 
         {
             if (adjustableDatesNode.Attributes["id"] != null) 
             {
                 adjustableDatesIDRef_ = adjustableDatesNode.Attributes["id"].Value;
                 AdjustableDates ob = new AdjustableDates(adjustableDatesNode);
                 IDManager.SetID(adjustableDatesIDRef_, ob);
             }
             else if (adjustableDatesNode.Attributes["href"] != null)
             {
                 adjustableDatesIDRef_ = adjustableDatesNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDates_ = new AdjustableDates(adjustableDatesNode);
             }
         }
         else
         {
             adjustableDates_ = new AdjustableDates(adjustableDatesNode);
         }
     }
     
 
     XmlNode relativeDateNode = xmlNode.SelectSingleNode("relativeDate");
     
     if (relativeDateNode != null)
     {
         if (relativeDateNode.Attributes["href"] != null || relativeDateNode.Attributes["id"] != null) 
         {
             if (relativeDateNode.Attributes["id"] != null) 
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeDateNode);
                 IDManager.SetID(relativeDateIDRef_, ob);
             }
             else if (relativeDateNode.Attributes["href"] != null)
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeDate_ = new RelativeDateOffset(relativeDateNode);
             }
         }
         else
         {
             relativeDate_ = new RelativeDateOffset(relativeDateNode);
         }
     }
     
 
 }
 public AdjustableOrRelativeDate(XmlNode xmlNode)
 {
     XmlNodeList adjustableDateNodeList = xmlNode.SelectNodes("adjustableDate");
     if (adjustableDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustableDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustableDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(adjustableDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustableDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustableDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeDateNodeList = xmlNode.SelectNodes("relativeDate");
     if (relativeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
 }
        public ResetDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");

            if (resetRelativeToNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in resetRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef = item.Attributes["id"].Name;
                        ResetRelativeToEnum ob = ResetRelativeToEnum();
                        IDManager.SetID(resetRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetRelativeTo = new ResetRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");

            if (initialFixingDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in initialFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(initialFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialFixingDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");

            if (fixingDatesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDatesIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(fixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDates = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");

            if (rateCutOffDaysOffsetNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                        Offset ob = Offset();
                        IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        rateCutOffDaysOffset = new Offset(item);
                    }
                }
            }


            XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");

            if (resetFrequencyNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in resetFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef = item.Attributes["id"].Name;
                        ResetFrequency ob = ResetFrequency();
                        IDManager.SetID(resetFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetFrequency = new ResetFrequency(item);
                    }
                }
            }


            XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");

            if (resetDatesAdjustmentsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in resetDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetDatesAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }
        }
 public Composite(XmlNode xmlNode)
 {
     XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod");
     if (determinationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in determinationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 determinationMethodIDRef = item.Attributes["id"].Name;
                 DeterminationMethod ob = DeterminationMethod();
                 IDManager.SetID(determinationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 determinationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 determinationMethod = new DeterminationMethod(item);
             }
         }
     }
     
 
     XmlNodeList relativeDateNodeList = xmlNode.SelectNodes("relativeDate");
     if (relativeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource");
     if (fxSpotRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSpotRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSpotRateSourceIDRef = item.Attributes["id"].Name;
                 FxSpotRateSource ob = FxSpotRateSource();
                 IDManager.SetID(fxSpotRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSpotRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSpotRateSource = new FxSpotRateSource(item);
             }
         }
     }
     
 
 }
 public ExerciseFee(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;
                 NotionalReference ob = new NotionalReference(notionalReferenceNode);
                 IDManager.SetID(notionalReferenceIDRef_, ob);
             }
             else if (notionalReferenceNode.Attributes["href"] != null)
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 notionalReference_ = new NotionalReference(notionalReferenceNode);
             }
         }
         else
         {
             notionalReference_ = new NotionalReference(notionalReferenceNode);
         }
     }
     
 
     XmlNode feeAmountNode = xmlNode.SelectSingleNode("feeAmount");
     
     if (feeAmountNode != null)
     {
         if (feeAmountNode.Attributes["href"] != null || feeAmountNode.Attributes["id"] != null) 
         {
             if (feeAmountNode.Attributes["id"] != null) 
             {
                 feeAmountIDRef_ = feeAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(feeAmountNode);
                 IDManager.SetID(feeAmountIDRef_, ob);
             }
             else if (feeAmountNode.Attributes["href"] != null)
             {
                 feeAmountIDRef_ = feeAmountNode.Attributes["href"].Value;
             }
             else
             {
                 feeAmount_ = new XsdTypeDecimal(feeAmountNode);
             }
         }
         else
         {
             feeAmount_ = new XsdTypeDecimal(feeAmountNode);
         }
     }
     
 
     XmlNode feeRateNode = xmlNode.SelectSingleNode("feeRate");
     
     if (feeRateNode != null)
     {
         if (feeRateNode.Attributes["href"] != null || feeRateNode.Attributes["id"] != null) 
         {
             if (feeRateNode.Attributes["id"] != null) 
             {
                 feeRateIDRef_ = feeRateNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(feeRateNode);
                 IDManager.SetID(feeRateIDRef_, ob);
             }
             else if (feeRateNode.Attributes["href"] != null)
             {
                 feeRateIDRef_ = feeRateNode.Attributes["href"].Value;
             }
             else
             {
                 feeRate_ = new XsdTypeDecimal(feeRateNode);
             }
         }
         else
         {
             feeRate_ = new XsdTypeDecimal(feeRateNode);
         }
     }
     
 
     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);
         }
     }
     
 
 }
 public FxLinkedNotionalSchedule(XmlNode xmlNode)
 {
     XmlNode constantNotionalScheduleReferenceNode = xmlNode.SelectSingleNode("constantNotionalScheduleReference");
     
     if (constantNotionalScheduleReferenceNode != null)
     {
         if (constantNotionalScheduleReferenceNode.Attributes["href"] != null || constantNotionalScheduleReferenceNode.Attributes["id"] != null) 
         {
             if (constantNotionalScheduleReferenceNode.Attributes["id"] != null) 
             {
                 constantNotionalScheduleReferenceIDRef_ = constantNotionalScheduleReferenceNode.Attributes["id"].Value;
                 NotionalReference ob = new NotionalReference(constantNotionalScheduleReferenceNode);
                 IDManager.SetID(constantNotionalScheduleReferenceIDRef_, ob);
             }
             else if (constantNotionalScheduleReferenceNode.Attributes["href"] != null)
             {
                 constantNotionalScheduleReferenceIDRef_ = constantNotionalScheduleReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 constantNotionalScheduleReference_ = new NotionalReference(constantNotionalScheduleReferenceNode);
             }
         }
         else
         {
             constantNotionalScheduleReference_ = new NotionalReference(constantNotionalScheduleReferenceNode);
         }
     }
     
 
     XmlNode initialValueNode = xmlNode.SelectSingleNode("initialValue");
     
     if (initialValueNode != null)
     {
         if (initialValueNode.Attributes["href"] != null || initialValueNode.Attributes["id"] != null) 
         {
             if (initialValueNode.Attributes["id"] != null) 
             {
                 initialValueIDRef_ = initialValueNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(initialValueNode);
                 IDManager.SetID(initialValueIDRef_, ob);
             }
             else if (initialValueNode.Attributes["href"] != null)
             {
                 initialValueIDRef_ = initialValueNode.Attributes["href"].Value;
             }
             else
             {
                 initialValue_ = new XsdTypeDecimal(initialValueNode);
             }
         }
         else
         {
             initialValue_ = new XsdTypeDecimal(initialValueNode);
         }
     }
     
 
     XmlNode varyingNotionalCurrencyNode = xmlNode.SelectSingleNode("varyingNotionalCurrency");
     
     if (varyingNotionalCurrencyNode != null)
     {
         if (varyingNotionalCurrencyNode.Attributes["href"] != null || varyingNotionalCurrencyNode.Attributes["id"] != null) 
         {
             if (varyingNotionalCurrencyNode.Attributes["id"] != null) 
             {
                 varyingNotionalCurrencyIDRef_ = varyingNotionalCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(varyingNotionalCurrencyNode);
                 IDManager.SetID(varyingNotionalCurrencyIDRef_, ob);
             }
             else if (varyingNotionalCurrencyNode.Attributes["href"] != null)
             {
                 varyingNotionalCurrencyIDRef_ = varyingNotionalCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 varyingNotionalCurrency_ = new Currency(varyingNotionalCurrencyNode);
             }
         }
         else
         {
             varyingNotionalCurrency_ = new Currency(varyingNotionalCurrencyNode);
         }
     }
     
 
     XmlNode varyingNotionalFixingDatesNode = xmlNode.SelectSingleNode("varyingNotionalFixingDates");
     
     if (varyingNotionalFixingDatesNode != null)
     {
         if (varyingNotionalFixingDatesNode.Attributes["href"] != null || varyingNotionalFixingDatesNode.Attributes["id"] != null) 
         {
             if (varyingNotionalFixingDatesNode.Attributes["id"] != null) 
             {
                 varyingNotionalFixingDatesIDRef_ = varyingNotionalFixingDatesNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(varyingNotionalFixingDatesNode);
                 IDManager.SetID(varyingNotionalFixingDatesIDRef_, ob);
             }
             else if (varyingNotionalFixingDatesNode.Attributes["href"] != null)
             {
                 varyingNotionalFixingDatesIDRef_ = varyingNotionalFixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 varyingNotionalFixingDates_ = new RelativeDateOffset(varyingNotionalFixingDatesNode);
             }
         }
         else
         {
             varyingNotionalFixingDates_ = new RelativeDateOffset(varyingNotionalFixingDatesNode);
         }
     }
     
 
     XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource");
     
     if (fxSpotRateSourceNode != null)
     {
         if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null) 
         {
             if (fxSpotRateSourceNode.Attributes["id"] != null) 
             {
                 fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value;
                 FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode);
                 IDManager.SetID(fxSpotRateSourceIDRef_, ob);
             }
             else if (fxSpotRateSourceNode.Attributes["href"] != null)
             {
                 fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
             }
         }
         else
         {
             fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
         }
     }
     
 
     XmlNode varyingNotionalInterimExchangePaymentDatesNode = xmlNode.SelectSingleNode("varyingNotionalInterimExchangePaymentDates");
     
     if (varyingNotionalInterimExchangePaymentDatesNode != null)
     {
         if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"] != null || varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"] != null) 
         {
             if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"] != null) 
             {
                 varyingNotionalInterimExchangePaymentDatesIDRef_ = varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode);
                 IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef_, ob);
             }
             else if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"] != null)
             {
                 varyingNotionalInterimExchangePaymentDatesIDRef_ = varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 varyingNotionalInterimExchangePaymentDates_ = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode);
             }
         }
         else
         {
             varyingNotionalInterimExchangePaymentDates_ = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode);
         }
     }
     
 
 }
 public CalculationPeriodDates(XmlNode xmlNode)
 {
     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;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate");
     if (relativeEffectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeEffectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeEffectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset();
                 IDManager.SetID(relativeEffectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeEffectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeEffectiveDate = new AdjustedRelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");
     if (terminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in terminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 terminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(terminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 terminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 terminationDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate");
     if (relativeTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeTerminationDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeTerminationDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");
     if (calculationPeriodDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     if (firstPeriodStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstPeriodStartDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate");
     if (firstRegularPeriodStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstRegularPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstRegularPeriodStartDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstRegularPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstRegularPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstRegularPeriodStartDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate");
     if (firstCompoundingPeriodEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstCompoundingPeriodEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstCompoundingPeriodEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstCompoundingPeriodEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstCompoundingPeriodEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstCompoundingPeriodEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate");
     if (lastRegularPeriodEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lastRegularPeriodEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lastRegularPeriodEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(lastRegularPeriodEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lastRegularPeriodEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lastRegularPeriodEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType");
     if (stubPeriodTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubPeriodTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubPeriodTypeIDRef = item.Attributes["id"].Name;
                 StubPeriodTypeEnum ob = StubPeriodTypeEnum();
                 IDManager.SetID(stubPeriodTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubPeriodTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubPeriodType = new StubPeriodTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");
     if (calculationPeriodFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                 CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                 IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodFrequency = new CalculationPeriodFrequency(item);
             }
         }
     }
     
 
 }
 public InterestLegResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
         }
     }
     
 
 }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new RelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new RelativeDateOffset(fixingDatesNode);
         }
     }
     
 
     XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");
     
     if (rateCutOffDaysOffsetNode != null)
     {
         if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null) 
         {
             if (rateCutOffDaysOffsetNode.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(rateCutOffDaysOffsetNode);
                 IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
             }
             else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
             }
         }
         else
         {
             rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");
     
     if (resetDatesAdjustmentsNode != null)
     {
         if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (resetDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                 IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
             }
             else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
             }
         }
         else
         {
             resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
         }
     }
     
 
 }
        public Composite(XmlNode xmlNode)
        {
            XmlNodeList determinationMethodNodeList = xmlNode.SelectNodes("determinationMethod");

            if (determinationMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in determinationMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        determinationMethodIDRef = item.Attributes["id"].Name;
                        DeterminationMethod ob = DeterminationMethod();
                        IDManager.SetID(determinationMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        determinationMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        determinationMethod = new DeterminationMethod(item);
                    }
                }
            }


            XmlNodeList relativeDateNodeList = xmlNode.SelectNodes("relativeDate");

            if (relativeDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in relativeDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relativeDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(relativeDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relativeDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relativeDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource");

            if (fxSpotRateSourceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fxSpotRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxSpotRateSourceIDRef = item.Attributes["id"].Name;
                        FxSpotRateSource ob = FxSpotRateSource();
                        IDManager.SetID(fxSpotRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxSpotRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxSpotRateSource = new FxSpotRateSource(item);
                    }
                }
            }
        }
        public ExerciseFee(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;
                        NotionalReference ob = new NotionalReference(notionalReferenceNode);
                        IDManager.SetID(notionalReferenceIDRef_, ob);
                    }
                    else if (notionalReferenceNode.Attributes["href"] != null)
                    {
                        notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notionalReference_ = new NotionalReference(notionalReferenceNode);
                    }
                }
                else
                {
                    notionalReference_ = new NotionalReference(notionalReferenceNode);
                }
            }


            XmlNode feeAmountNode = xmlNode.SelectSingleNode("feeAmount");

            if (feeAmountNode != null)
            {
                if (feeAmountNode.Attributes["href"] != null || feeAmountNode.Attributes["id"] != null)
                {
                    if (feeAmountNode.Attributes["id"] != null)
                    {
                        feeAmountIDRef_ = feeAmountNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(feeAmountNode);
                        IDManager.SetID(feeAmountIDRef_, ob);
                    }
                    else if (feeAmountNode.Attributes["href"] != null)
                    {
                        feeAmountIDRef_ = feeAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        feeAmount_ = new XsdTypeDecimal(feeAmountNode);
                    }
                }
                else
                {
                    feeAmount_ = new XsdTypeDecimal(feeAmountNode);
                }
            }


            XmlNode feeRateNode = xmlNode.SelectSingleNode("feeRate");

            if (feeRateNode != null)
            {
                if (feeRateNode.Attributes["href"] != null || feeRateNode.Attributes["id"] != null)
                {
                    if (feeRateNode.Attributes["id"] != null)
                    {
                        feeRateIDRef_ = feeRateNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(feeRateNode);
                        IDManager.SetID(feeRateIDRef_, ob);
                    }
                    else if (feeRateNode.Attributes["href"] != null)
                    {
                        feeRateIDRef_ = feeRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        feeRate_ = new XsdTypeDecimal(feeRateNode);
                    }
                }
                else
                {
                    feeRate_ = new XsdTypeDecimal(feeRateNode);
                }
            }


            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);
                }
            }
        }
 public Fra(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 adjustedEffectiveDateNode = xmlNode.SelectSingleNode("adjustedEffectiveDate");
     
     if (adjustedEffectiveDateNode != null)
     {
         if (adjustedEffectiveDateNode.Attributes["href"] != null || adjustedEffectiveDateNode.Attributes["id"] != null) 
         {
             if (adjustedEffectiveDateNode.Attributes["id"] != null) 
             {
                 adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["id"].Value;
                 RequiredIdentifierDate ob = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                 IDManager.SetID(adjustedEffectiveDateIDRef_, ob);
             }
             else if (adjustedEffectiveDateNode.Attributes["href"] != null)
             {
                 adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
             }
         }
         else
         {
             adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
         }
     }
     
 
     XmlNode adjustedTerminationDateNode = xmlNode.SelectSingleNode("adjustedTerminationDate");
     
     if (adjustedTerminationDateNode != null)
     {
         if (adjustedTerminationDateNode.Attributes["href"] != null || adjustedTerminationDateNode.Attributes["id"] != null) 
         {
             if (adjustedTerminationDateNode.Attributes["id"] != null) 
             {
                 adjustedTerminationDateIDRef_ = adjustedTerminationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedTerminationDateNode);
                 IDManager.SetID(adjustedTerminationDateIDRef_, ob);
             }
             else if (adjustedTerminationDateNode.Attributes["href"] != null)
             {
                 adjustedTerminationDateIDRef_ = adjustedTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedTerminationDate_ = new XsdTypeDate(adjustedTerminationDateNode);
             }
         }
         else
         {
             adjustedTerminationDate_ = new XsdTypeDate(adjustedTerminationDateNode);
         }
     }
     
 
     XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");
     
     if (paymentDateNode != null)
     {
         if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null) 
         {
             if (paymentDateNode.Attributes["id"] != null) 
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(paymentDateNode);
                 IDManager.SetID(paymentDateIDRef_, ob);
             }
             else if (paymentDateNode.Attributes["href"] != null)
             {
                 paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDate_ = new AdjustableDate(paymentDateNode);
             }
         }
         else
         {
             paymentDate_ = new AdjustableDate(paymentDateNode);
         }
     }
     
 
     XmlNode fixingDateOffsetNode = xmlNode.SelectSingleNode("fixingDateOffset");
     
     if (fixingDateOffsetNode != null)
     {
         if (fixingDateOffsetNode.Attributes["href"] != null || fixingDateOffsetNode.Attributes["id"] != null) 
         {
             if (fixingDateOffsetNode.Attributes["id"] != null) 
             {
                 fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDateOffsetNode);
                 IDManager.SetID(fixingDateOffsetIDRef_, ob);
             }
             else if (fixingDateOffsetNode.Attributes["href"] != null)
             {
                 fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
             }
         }
         else
         {
             fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
         }
     }
     
 
     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 calculationPeriodNumberOfDaysNode = xmlNode.SelectSingleNode("calculationPeriodNumberOfDays");
     
     if (calculationPeriodNumberOfDaysNode != null)
     {
         if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null || calculationPeriodNumberOfDaysNode.Attributes["id"] != null) 
         {
             if (calculationPeriodNumberOfDaysNode.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["id"].Value;
                 XsdTypePositiveInteger ob = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef_, ob);
             }
             else if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null)
             {
                 calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
             }
         }
         else
         {
             calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
         }
     }
     
 
     XmlNode notionalNode = xmlNode.SelectSingleNode("notional");
     
     if (notionalNode != null)
     {
         if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null) 
         {
             if (notionalNode.Attributes["id"] != null) 
             {
                 notionalIDRef_ = notionalNode.Attributes["id"].Value;
                 Money ob = new Money(notionalNode);
                 IDManager.SetID(notionalIDRef_, ob);
             }
             else if (notionalNode.Attributes["href"] != null)
             {
                 notionalIDRef_ = notionalNode.Attributes["href"].Value;
             }
             else
             {
                 notional_ = new Money(notionalNode);
             }
         }
         else
         {
             notional_ = new Money(notionalNode);
         }
     }
     
 
     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;
                 XsdTypeDecimal ob = new XsdTypeDecimal(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new XsdTypeDecimal(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new XsdTypeDecimal(fixedRateNode);
         }
     }
     
 
     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);
         }
     }
     
 
     XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");
     
     if (indexTenorNodeList != null)
     {
         this.indexTenor_ = new List<Period>();
         foreach (XmlNode item in indexTenorNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     indexTenorIDRef_ = item.Attributes["id"].Value;
                     indexTenor_.Add(new Period(item));
                     IDManager.SetID(indexTenorIDRef_, indexTenor_[indexTenor_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     indexTenorIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 indexTenor_.Add(new Period(item));
                 }
             }
             else
             {
                 indexTenor_.Add(new Period(item));
             }
         }
     }
     
 
     XmlNode fraDiscountingNode = xmlNode.SelectSingleNode("fraDiscounting");
     
     if (fraDiscountingNode != null)
     {
         if (fraDiscountingNode.Attributes["href"] != null || fraDiscountingNode.Attributes["id"] != null) 
         {
             if (fraDiscountingNode.Attributes["id"] != null) 
             {
                 fraDiscountingIDRef_ = fraDiscountingNode.Attributes["id"].Value;
                 FraDiscountingEnum ob = new FraDiscountingEnum(fraDiscountingNode);
                 IDManager.SetID(fraDiscountingIDRef_, ob);
             }
             else if (fraDiscountingNode.Attributes["href"] != null)
             {
                 fraDiscountingIDRef_ = fraDiscountingNode.Attributes["href"].Value;
             }
             else
             {
                 fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
             }
         }
         else
         {
             fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
         }
     }
     
 
 }
Example #15
0
        public Fra(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 adjustedEffectiveDateNode = xmlNode.SelectSingleNode("adjustedEffectiveDate");

            if (adjustedEffectiveDateNode != null)
            {
                if (adjustedEffectiveDateNode.Attributes["href"] != null || adjustedEffectiveDateNode.Attributes["id"] != null)
                {
                    if (adjustedEffectiveDateNode.Attributes["id"] != null)
                    {
                        adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["id"].Value;
                        RequiredIdentifierDate ob = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                        IDManager.SetID(adjustedEffectiveDateIDRef_, ob);
                    }
                    else if (adjustedEffectiveDateNode.Attributes["href"] != null)
                    {
                        adjustedEffectiveDateIDRef_ = adjustedEffectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                    }
                }
                else
                {
                    adjustedEffectiveDate_ = new RequiredIdentifierDate(adjustedEffectiveDateNode);
                }
            }


            XmlNode adjustedTerminationDateNode = xmlNode.SelectSingleNode("adjustedTerminationDate");

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


            XmlNode paymentDateNode = xmlNode.SelectSingleNode("paymentDate");

            if (paymentDateNode != null)
            {
                if (paymentDateNode.Attributes["href"] != null || paymentDateNode.Attributes["id"] != null)
                {
                    if (paymentDateNode.Attributes["id"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(paymentDateNode);
                        IDManager.SetID(paymentDateIDRef_, ob);
                    }
                    else if (paymentDateNode.Attributes["href"] != null)
                    {
                        paymentDateIDRef_ = paymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDate_ = new AdjustableDate(paymentDateNode);
                    }
                }
                else
                {
                    paymentDate_ = new AdjustableDate(paymentDateNode);
                }
            }


            XmlNode fixingDateOffsetNode = xmlNode.SelectSingleNode("fixingDateOffset");

            if (fixingDateOffsetNode != null)
            {
                if (fixingDateOffsetNode.Attributes["href"] != null || fixingDateOffsetNode.Attributes["id"] != null)
                {
                    if (fixingDateOffsetNode.Attributes["id"] != null)
                    {
                        fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(fixingDateOffsetNode);
                        IDManager.SetID(fixingDateOffsetIDRef_, ob);
                    }
                    else if (fixingDateOffsetNode.Attributes["href"] != null)
                    {
                        fixingDateOffsetIDRef_ = fixingDateOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
                    }
                }
                else
                {
                    fixingDateOffset_ = new RelativeDateOffset(fixingDateOffsetNode);
                }
            }


            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 calculationPeriodNumberOfDaysNode = xmlNode.SelectSingleNode("calculationPeriodNumberOfDays");

            if (calculationPeriodNumberOfDaysNode != null)
            {
                if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null || calculationPeriodNumberOfDaysNode.Attributes["id"] != null)
                {
                    if (calculationPeriodNumberOfDaysNode.Attributes["id"] != null)
                    {
                        calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["id"].Value;
                        XsdTypePositiveInteger ob = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                        IDManager.SetID(calculationPeriodNumberOfDaysIDRef_, ob);
                    }
                    else if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null)
                    {
                        calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                    }
                }
                else
                {
                    calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode);
                }
            }


            XmlNode notionalNode = xmlNode.SelectSingleNode("notional");

            if (notionalNode != null)
            {
                if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null)
                {
                    if (notionalNode.Attributes["id"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["id"].Value;
                        Money ob = new Money(notionalNode);
                        IDManager.SetID(notionalIDRef_, ob);
                    }
                    else if (notionalNode.Attributes["href"] != null)
                    {
                        notionalIDRef_ = notionalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notional_ = new Money(notionalNode);
                    }
                }
                else
                {
                    notional_ = new Money(notionalNode);
                }
            }


            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;
                        XsdTypeDecimal ob = new XsdTypeDecimal(fixedRateNode);
                        IDManager.SetID(fixedRateIDRef_, ob);
                    }
                    else if (fixedRateNode.Attributes["href"] != null)
                    {
                        fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixedRate_ = new XsdTypeDecimal(fixedRateNode);
                    }
                }
                else
                {
                    fixedRate_ = new XsdTypeDecimal(fixedRateNode);
                }
            }


            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);
                }
            }


            XmlNodeList indexTenorNodeList = xmlNode.SelectNodes("indexTenor");

            if (indexTenorNodeList != null)
            {
                this.indexTenor_ = new List <Period>();
                foreach (XmlNode item in indexTenorNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            indexTenorIDRef_ = item.Attributes["id"].Value;
                            indexTenor_.Add(new Period(item));
                            IDManager.SetID(indexTenorIDRef_, indexTenor_[indexTenor_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            indexTenorIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            indexTenor_.Add(new Period(item));
                        }
                    }
                    else
                    {
                        indexTenor_.Add(new Period(item));
                    }
                }
            }


            XmlNode fraDiscountingNode = xmlNode.SelectSingleNode("fraDiscounting");

            if (fraDiscountingNode != null)
            {
                if (fraDiscountingNode.Attributes["href"] != null || fraDiscountingNode.Attributes["id"] != null)
                {
                    if (fraDiscountingNode.Attributes["id"] != null)
                    {
                        fraDiscountingIDRef_ = fraDiscountingNode.Attributes["id"].Value;
                        FraDiscountingEnum ob = new FraDiscountingEnum(fraDiscountingNode);
                        IDManager.SetID(fraDiscountingIDRef_, ob);
                    }
                    else if (fraDiscountingNode.Attributes["href"] != null)
                    {
                        fraDiscountingIDRef_ = fraDiscountingNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
                    }
                }
                else
                {
                    fraDiscounting_ = new FraDiscountingEnum(fraDiscountingNode);
                }
            }
        }
        public ResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

            if (initialFixingDateNode != null)
            {
                if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null)
                {
                    if (initialFixingDateNode.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                        IDManager.SetID(initialFixingDateIDRef_, ob);
                    }
                    else if (initialFixingDateNode.Attributes["href"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                    }
                }
                else
                {
                    initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                }
            }


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

            if (fixingDatesNode != null)
            {
                if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null)
                {
                    if (fixingDatesNode.Attributes["id"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(fixingDatesNode);
                        IDManager.SetID(fixingDatesIDRef_, ob);
                    }
                    else if (fixingDatesNode.Attributes["href"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDates_ = new RelativeDateOffset(fixingDatesNode);
                    }
                }
                else
                {
                    fixingDates_ = new RelativeDateOffset(fixingDatesNode);
                }
            }


            XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");

            if (rateCutOffDaysOffsetNode != null)
            {
                if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null)
                {
                    if (rateCutOffDaysOffsetNode.Attributes["id"] != null)
                    {
                        rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                        Offset ob = new Offset(rateCutOffDaysOffsetNode);
                        IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
                    }
                    else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
                    {
                        rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
                    }
                }
                else
                {
                    rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");

            if (resetDatesAdjustmentsNode != null)
            {
                if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null)
                {
                    if (resetDatesAdjustmentsNode.Attributes["id"] != null)
                    {
                        resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                        IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
                    }
                    else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
                    {
                        resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                    }
                }
                else
                {
                    resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                }
            }
        }
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        InterestLegCalculationPeriodDatesReference ob = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new InterestLegCalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");

            if (resetRelativeToNode != null)
            {
                if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null)
                {
                    if (resetRelativeToNode.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                        ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                        IDManager.SetID(resetRelativeToIDRef_, ob);
                    }
                    else if (resetRelativeToNode.Attributes["href"] != null)
                    {
                        resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                    }
                }
                else
                {
                    resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
                }
            }


            XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");

            if (resetFrequencyNode != null)
            {
                if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null)
                {
                    if (resetFrequencyNode.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                        ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                        IDManager.SetID(resetFrequencyIDRef_, ob);
                    }
                    else if (resetFrequencyNode.Attributes["href"] != null)
                    {
                        resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                    }
                }
                else
                {
                    resetFrequency_ = new ResetFrequency(resetFrequencyNode);
                }
            }


            XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");

            if (initialFixingDateNode != null)
            {
                if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null)
                {
                    if (initialFixingDateNode.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                        IDManager.SetID(initialFixingDateIDRef_, ob);
                    }
                    else if (initialFixingDateNode.Attributes["href"] != null)
                    {
                        initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                    }
                }
                else
                {
                    initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
                }
            }


            XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");

            if (fixingDatesNode != null)
            {
                if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null)
                {
                    if (fixingDatesNode.Attributes["id"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                        AdjustableDatesOrRelativeDateOffset ob = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                        IDManager.SetID(fixingDatesIDRef_, ob);
                    }
                    else if (fixingDatesNode.Attributes["href"] != null)
                    {
                        fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                    }
                }
                else
                {
                    fixingDates_ = new AdjustableDatesOrRelativeDateOffset(fixingDatesNode);
                }
            }
        }
Example #18
0
        public InterestLegResetDates(XmlNode xmlNode)
        {
            XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                        InterestLegCalculationPeriodDatesReference ob = InterestLegCalculationPeriodDatesReference();
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesReference = new InterestLegCalculationPeriodDatesReference(item);
                    }
                }
            }


            XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");

            if (resetRelativeToNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in resetRelativeToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetRelativeToIDRef = item.Attributes["id"].Name;
                        ResetRelativeToEnum ob = ResetRelativeToEnum();
                        IDManager.SetID(resetRelativeToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetRelativeToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetRelativeTo = new ResetRelativeToEnum(item);
                    }
                }
            }


            XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");

            if (resetFrequencyNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in resetFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetFrequencyIDRef = item.Attributes["id"].Name;
                        ResetFrequency ob = ResetFrequency();
                        IDManager.SetID(resetFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetFrequency = new ResetFrequency(item);
                    }
                }
            }


            XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");

            if (initialFixingDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in initialFixingDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialFixingDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(initialFixingDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialFixingDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialFixingDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");

            if (fixingDatesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDatesIDRef = item.Attributes["id"].Name;
                        AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                        IDManager.SetID(fixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDates = new AdjustableDatesOrRelativeDateOffset(item);
                    }
                }
            }
        }
        public FxLinkedNotionalSchedule(XmlNode xmlNode)
        {
            XmlNode constantNotionalScheduleReferenceNode = xmlNode.SelectSingleNode("constantNotionalScheduleReference");

            if (constantNotionalScheduleReferenceNode != null)
            {
                if (constantNotionalScheduleReferenceNode.Attributes["href"] != null || constantNotionalScheduleReferenceNode.Attributes["id"] != null)
                {
                    if (constantNotionalScheduleReferenceNode.Attributes["id"] != null)
                    {
                        constantNotionalScheduleReferenceIDRef_ = constantNotionalScheduleReferenceNode.Attributes["id"].Value;
                        NotionalReference ob = new NotionalReference(constantNotionalScheduleReferenceNode);
                        IDManager.SetID(constantNotionalScheduleReferenceIDRef_, ob);
                    }
                    else if (constantNotionalScheduleReferenceNode.Attributes["href"] != null)
                    {
                        constantNotionalScheduleReferenceIDRef_ = constantNotionalScheduleReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        constantNotionalScheduleReference_ = new NotionalReference(constantNotionalScheduleReferenceNode);
                    }
                }
                else
                {
                    constantNotionalScheduleReference_ = new NotionalReference(constantNotionalScheduleReferenceNode);
                }
            }


            XmlNode initialValueNode = xmlNode.SelectSingleNode("initialValue");

            if (initialValueNode != null)
            {
                if (initialValueNode.Attributes["href"] != null || initialValueNode.Attributes["id"] != null)
                {
                    if (initialValueNode.Attributes["id"] != null)
                    {
                        initialValueIDRef_ = initialValueNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(initialValueNode);
                        IDManager.SetID(initialValueIDRef_, ob);
                    }
                    else if (initialValueNode.Attributes["href"] != null)
                    {
                        initialValueIDRef_ = initialValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialValue_ = new XsdTypeDecimal(initialValueNode);
                    }
                }
                else
                {
                    initialValue_ = new XsdTypeDecimal(initialValueNode);
                }
            }


            XmlNode varyingNotionalCurrencyNode = xmlNode.SelectSingleNode("varyingNotionalCurrency");

            if (varyingNotionalCurrencyNode != null)
            {
                if (varyingNotionalCurrencyNode.Attributes["href"] != null || varyingNotionalCurrencyNode.Attributes["id"] != null)
                {
                    if (varyingNotionalCurrencyNode.Attributes["id"] != null)
                    {
                        varyingNotionalCurrencyIDRef_ = varyingNotionalCurrencyNode.Attributes["id"].Value;
                        Currency ob = new Currency(varyingNotionalCurrencyNode);
                        IDManager.SetID(varyingNotionalCurrencyIDRef_, ob);
                    }
                    else if (varyingNotionalCurrencyNode.Attributes["href"] != null)
                    {
                        varyingNotionalCurrencyIDRef_ = varyingNotionalCurrencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varyingNotionalCurrency_ = new Currency(varyingNotionalCurrencyNode);
                    }
                }
                else
                {
                    varyingNotionalCurrency_ = new Currency(varyingNotionalCurrencyNode);
                }
            }


            XmlNode varyingNotionalFixingDatesNode = xmlNode.SelectSingleNode("varyingNotionalFixingDates");

            if (varyingNotionalFixingDatesNode != null)
            {
                if (varyingNotionalFixingDatesNode.Attributes["href"] != null || varyingNotionalFixingDatesNode.Attributes["id"] != null)
                {
                    if (varyingNotionalFixingDatesNode.Attributes["id"] != null)
                    {
                        varyingNotionalFixingDatesIDRef_ = varyingNotionalFixingDatesNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(varyingNotionalFixingDatesNode);
                        IDManager.SetID(varyingNotionalFixingDatesIDRef_, ob);
                    }
                    else if (varyingNotionalFixingDatesNode.Attributes["href"] != null)
                    {
                        varyingNotionalFixingDatesIDRef_ = varyingNotionalFixingDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varyingNotionalFixingDates_ = new RelativeDateOffset(varyingNotionalFixingDatesNode);
                    }
                }
                else
                {
                    varyingNotionalFixingDates_ = new RelativeDateOffset(varyingNotionalFixingDatesNode);
                }
            }


            XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource");

            if (fxSpotRateSourceNode != null)
            {
                if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null)
                {
                    if (fxSpotRateSourceNode.Attributes["id"] != null)
                    {
                        fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value;
                        FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode);
                        IDManager.SetID(fxSpotRateSourceIDRef_, ob);
                    }
                    else if (fxSpotRateSourceNode.Attributes["href"] != null)
                    {
                        fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
                    }
                }
                else
                {
                    fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
                }
            }


            XmlNode varyingNotionalInterimExchangePaymentDatesNode = xmlNode.SelectSingleNode("varyingNotionalInterimExchangePaymentDates");

            if (varyingNotionalInterimExchangePaymentDatesNode != null)
            {
                if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"] != null || varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"] != null)
                {
                    if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"] != null)
                    {
                        varyingNotionalInterimExchangePaymentDatesIDRef_ = varyingNotionalInterimExchangePaymentDatesNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode);
                        IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef_, ob);
                    }
                    else if (varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"] != null)
                    {
                        varyingNotionalInterimExchangePaymentDatesIDRef_ = varyingNotionalInterimExchangePaymentDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varyingNotionalInterimExchangePaymentDates_ = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode);
                    }
                }
                else
                {
                    varyingNotionalInterimExchangePaymentDates_ = new RelativeDateOffset(varyingNotionalInterimExchangePaymentDatesNode);
                }
            }
        }
        public Fra(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 adjustedEffectiveDateNodeList = xmlNode.SelectNodes("adjustedEffectiveDate");

            if (adjustedEffectiveDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in adjustedEffectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustedEffectiveDateIDRef = item.Attributes["id"].Name;
                        RequiredIdentifierDate ob = RequiredIdentifierDate();
                        IDManager.SetID(adjustedEffectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustedEffectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustedEffectiveDate = new RequiredIdentifierDate(item);
                    }
                }
            }


            XmlNodeList adjustedTerminationDateNodeList = xmlNode.SelectNodes("adjustedTerminationDate");

            if (adjustedTerminationDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in adjustedTerminationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustedTerminationDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(adjustedTerminationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustedTerminationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustedTerminationDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");

            if (paymentDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in paymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(paymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList fixingDateOffsetNodeList = xmlNode.SelectNodes("fixingDateOffset");

            if (fixingDateOffsetNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fixingDateOffsetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fixingDateOffsetIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(fixingDateOffsetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixingDateOffsetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixingDateOffset = new RelativeDateOffset(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 calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays");

            if (calculationPeriodNumberOfDaysNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name;
                        XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                        IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item);
                    }
                }
            }


            XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");

            if (notionalNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in notionalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalIDRef = item.Attributes["id"].Name;
                        Money ob = Money();
                        IDManager.SetID(notionalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notional = new Money(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;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(fixedRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fixedRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fixedRate = new XsdTypeDecimal(item);
                    }
                }
            }


            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");

            foreach (XmlNode item in indexTenorNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        indexTenorIDRef = item.Attributes["id"].Name;
                        List <Period> ob = new List <Period>();
                        ob.Add(new Period(item));
                        IDManager.SetID(indexTenorIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        indexTenorIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        indexTenor.Add(new Period(item));
                    }
                }
            }


            XmlNodeList fraDiscountingNodeList = xmlNode.SelectNodes("fraDiscounting");

            if (fraDiscountingNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fraDiscountingNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fraDiscountingIDRef = item.Attributes["id"].Name;
                        FraDiscountingEnum ob = FraDiscountingEnum();
                        IDManager.SetID(fraDiscountingIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fraDiscountingIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fraDiscounting = new FraDiscountingEnum(item);
                    }
                }
            }
        }
 public FxLinkedNotionalSchedule(XmlNode xmlNode)
 {
     XmlNodeList constantNotionalScheduleReferenceNodeList = xmlNode.SelectNodes("constantNotionalScheduleReference");
     if (constantNotionalScheduleReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in constantNotionalScheduleReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 constantNotionalScheduleReferenceIDRef = item.Attributes["id"].Name;
                 NotionalReference ob = NotionalReference();
                 IDManager.SetID(constantNotionalScheduleReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 constantNotionalScheduleReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 constantNotionalScheduleReference = new NotionalReference(item);
             }
         }
     }
     
 
     XmlNodeList initialValueNodeList = xmlNode.SelectNodes("initialValue");
     if (initialValueNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialValueNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialValueIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(initialValueIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialValueIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialValue = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList varyingNotionalCurrencyNodeList = xmlNode.SelectNodes("varyingNotionalCurrency");
     if (varyingNotionalCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varyingNotionalCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varyingNotionalCurrencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(varyingNotionalCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varyingNotionalCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varyingNotionalCurrency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList varyingNotionalFixingDatesNodeList = xmlNode.SelectNodes("varyingNotionalFixingDates");
     if (varyingNotionalFixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varyingNotionalFixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varyingNotionalFixingDatesIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(varyingNotionalFixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varyingNotionalFixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varyingNotionalFixingDates = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource");
     if (fxSpotRateSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSpotRateSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSpotRateSourceIDRef = item.Attributes["id"].Name;
                 FxSpotRateSource ob = FxSpotRateSource();
                 IDManager.SetID(fxSpotRateSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSpotRateSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSpotRateSource = new FxSpotRateSource(item);
             }
         }
     }
     
 
     XmlNodeList varyingNotionalInterimExchangePaymentDatesNodeList = xmlNode.SelectNodes("varyingNotionalInterimExchangePaymentDates");
     if (varyingNotionalInterimExchangePaymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varyingNotionalInterimExchangePaymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varyingNotionalInterimExchangePaymentDates = new RelativeDateOffset(item);
             }
         }
     }
     
 
 }
        public CalculationPeriodDates(XmlNode xmlNode)
        {
            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;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(effectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        effectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        effectiveDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList relativeEffectiveDateNodeList = xmlNode.SelectNodes("relativeEffectiveDate");

            if (relativeEffectiveDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in relativeEffectiveDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relativeEffectiveDateIDRef = item.Attributes["id"].Name;
                        AdjustedRelativeDateOffset ob = AdjustedRelativeDateOffset();
                        IDManager.SetID(relativeEffectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relativeEffectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relativeEffectiveDate = new AdjustedRelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");

            if (terminationDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in terminationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        terminationDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(terminationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        terminationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        terminationDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList relativeTerminationDateNodeList = xmlNode.SelectNodes("relativeTerminationDate");

            if (relativeTerminationDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in relativeTerminationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relativeTerminationDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(relativeTerminationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relativeTerminationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relativeTerminationDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList calculationPeriodDatesAdjustmentsNodeList = xmlNode.SelectNodes("calculationPeriodDatesAdjustments");

            if (calculationPeriodDatesAdjustmentsNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in calculationPeriodDatesAdjustmentsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                        BusinessDayAdjustments ob = BusinessDayAdjustments();
                        IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesAdjustmentsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDatesAdjustments = new BusinessDayAdjustments(item);
                    }
                }
            }


            XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");

            if (firstPeriodStartDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in firstPeriodStartDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                        AdjustableDate ob = AdjustableDate();
                        IDManager.SetID(firstPeriodStartDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        firstPeriodStartDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        firstPeriodStartDate = new AdjustableDate(item);
                    }
                }
            }


            XmlNodeList firstRegularPeriodStartDateNodeList = xmlNode.SelectNodes("firstRegularPeriodStartDate");

            if (firstRegularPeriodStartDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in firstRegularPeriodStartDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        firstRegularPeriodStartDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(firstRegularPeriodStartDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        firstRegularPeriodStartDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        firstRegularPeriodStartDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList firstCompoundingPeriodEndDateNodeList = xmlNode.SelectNodes("firstCompoundingPeriodEndDate");

            if (firstCompoundingPeriodEndDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in firstCompoundingPeriodEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        firstCompoundingPeriodEndDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(firstCompoundingPeriodEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        firstCompoundingPeriodEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        firstCompoundingPeriodEndDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList lastRegularPeriodEndDateNodeList = xmlNode.SelectNodes("lastRegularPeriodEndDate");

            if (lastRegularPeriodEndDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in lastRegularPeriodEndDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        lastRegularPeriodEndDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(lastRegularPeriodEndDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        lastRegularPeriodEndDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        lastRegularPeriodEndDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList stubPeriodTypeNodeList = xmlNode.SelectNodes("stubPeriodType");

            if (stubPeriodTypeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in stubPeriodTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stubPeriodTypeIDRef = item.Attributes["id"].Name;
                        StubPeriodTypeEnum ob = StubPeriodTypeEnum();
                        IDManager.SetID(stubPeriodTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stubPeriodTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stubPeriodType = new StubPeriodTypeEnum(item);
                    }
                }
            }


            XmlNodeList calculationPeriodFrequencyNodeList = xmlNode.SelectNodes("calculationPeriodFrequency");

            if (calculationPeriodFrequencyNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in calculationPeriodFrequencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodFrequencyIDRef = item.Attributes["id"].Name;
                        CalculationPeriodFrequency ob = CalculationPeriodFrequency();
                        IDManager.SetID(calculationPeriodFrequencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodFrequencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodFrequency = new CalculationPeriodFrequency(item);
                    }
                }
            }
        }
        public CalculationPeriodDates(XmlNode xmlNode)
        {
            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;
                        AdjustableDate ob = new AdjustableDate(effectiveDateNode);
                        IDManager.SetID(effectiveDateIDRef_, ob);
                    }
                    else if (effectiveDateNode.Attributes["href"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        effectiveDate_ = new AdjustableDate(effectiveDateNode);
                    }
                }
                else
                {
                    effectiveDate_ = new AdjustableDate(effectiveDateNode);
                }
            }


            XmlNode relativeEffectiveDateNode = xmlNode.SelectSingleNode("relativeEffectiveDate");

            if (relativeEffectiveDateNode != null)
            {
                if (relativeEffectiveDateNode.Attributes["href"] != null || relativeEffectiveDateNode.Attributes["id"] != null)
                {
                    if (relativeEffectiveDateNode.Attributes["id"] != null)
                    {
                        relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["id"].Value;
                        AdjustedRelativeDateOffset ob = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                        IDManager.SetID(relativeEffectiveDateIDRef_, ob);
                    }
                    else if (relativeEffectiveDateNode.Attributes["href"] != null)
                    {
                        relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                    }
                }
                else
                {
                    relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                }
            }


            XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");

            if (terminationDateNode != null)
            {
                if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null)
                {
                    if (terminationDateNode.Attributes["id"] != null)
                    {
                        terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(terminationDateNode);
                        IDManager.SetID(terminationDateIDRef_, ob);
                    }
                    else if (terminationDateNode.Attributes["href"] != null)
                    {
                        terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        terminationDate_ = new AdjustableDate(terminationDateNode);
                    }
                }
                else
                {
                    terminationDate_ = new AdjustableDate(terminationDateNode);
                }
            }


            XmlNode relativeTerminationDateNode = xmlNode.SelectSingleNode("relativeTerminationDate");

            if (relativeTerminationDateNode != null)
            {
                if (relativeTerminationDateNode.Attributes["href"] != null || relativeTerminationDateNode.Attributes["id"] != null)
                {
                    if (relativeTerminationDateNode.Attributes["id"] != null)
                    {
                        relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(relativeTerminationDateNode);
                        IDManager.SetID(relativeTerminationDateIDRef_, ob);
                    }
                    else if (relativeTerminationDateNode.Attributes["href"] != null)
                    {
                        relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
                    }
                }
                else
                {
                    relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
                }
            }


            XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");

            if (calculationPeriodDatesAdjustmentsNode != null)
            {
                if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                        IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob);
                    }
                    else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                    }
                }
                else
                {
                    calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                }
            }


            XmlNode firstPeriodStartDateNode = xmlNode.SelectSingleNode("firstPeriodStartDate");

            if (firstPeriodStartDateNode != null)
            {
                if (firstPeriodStartDateNode.Attributes["href"] != null || firstPeriodStartDateNode.Attributes["id"] != null)
                {
                    if (firstPeriodStartDateNode.Attributes["id"] != null)
                    {
                        firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["id"].Value;
                        AdjustableDate ob = new AdjustableDate(firstPeriodStartDateNode);
                        IDManager.SetID(firstPeriodStartDateIDRef_, ob);
                    }
                    else if (firstPeriodStartDateNode.Attributes["href"] != null)
                    {
                        firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
                    }
                }
                else
                {
                    firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
                }
            }


            XmlNode firstRegularPeriodStartDateNode = xmlNode.SelectSingleNode("firstRegularPeriodStartDate");

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


            XmlNode firstCompoundingPeriodEndDateNode = xmlNode.SelectSingleNode("firstCompoundingPeriodEndDate");

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


            XmlNode lastRegularPeriodEndDateNode = xmlNode.SelectSingleNode("lastRegularPeriodEndDate");

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


            XmlNode stubPeriodTypeNode = xmlNode.SelectSingleNode("stubPeriodType");

            if (stubPeriodTypeNode != null)
            {
                if (stubPeriodTypeNode.Attributes["href"] != null || stubPeriodTypeNode.Attributes["id"] != null)
                {
                    if (stubPeriodTypeNode.Attributes["id"] != null)
                    {
                        stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["id"].Value;
                        StubPeriodTypeEnum ob = new StubPeriodTypeEnum(stubPeriodTypeNode);
                        IDManager.SetID(stubPeriodTypeIDRef_, ob);
                    }
                    else if (stubPeriodTypeNode.Attributes["href"] != null)
                    {
                        stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
                    }
                }
                else
                {
                    stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
                }
            }


            XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");

            if (calculationPeriodFrequencyNode != null)
            {
                if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null)
                {
                    if (calculationPeriodFrequencyNode.Attributes["id"] != null)
                    {
                        calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                        CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                        IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
                    }
                    else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
                    {
                        calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                    }
                }
                else
                {
                    calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                }
            }
        }
 public CashSettlement(XmlNode xmlNode)
 {
     XmlNodeList cashSettlementValuationTimeNodeList = xmlNode.SelectNodes("cashSettlementValuationTime");
     if (cashSettlementValuationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementValuationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementValuationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(cashSettlementValuationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementValuationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementValuationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementValuationDateNodeList = xmlNode.SelectNodes("cashSettlementValuationDate");
     if (cashSettlementValuationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementValuationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementValuationDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(cashSettlementValuationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementValuationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementValuationDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementPaymentDateNodeList = xmlNode.SelectNodes("cashSettlementPaymentDate");
     if (cashSettlementPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementPaymentDateIDRef = item.Attributes["id"].Name;
                 CashSettlementPaymentDate ob = CashSettlementPaymentDate();
                 IDManager.SetID(cashSettlementPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementPaymentDate = new CashSettlementPaymentDate(item);
             }
         }
     }
     
 
     XmlNodeList cashPriceMethodNodeList = xmlNode.SelectNodes("cashPriceMethod");
     if (cashPriceMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashPriceMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashPriceMethodIDRef = item.Attributes["id"].Name;
                 CashPriceMethod ob = CashPriceMethod();
                 IDManager.SetID(cashPriceMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashPriceMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashPriceMethod = new CashPriceMethod(item);
             }
         }
     }
     
 
     XmlNodeList cashPriceAlternateMethodNodeList = xmlNode.SelectNodes("cashPriceAlternateMethod");
     if (cashPriceAlternateMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashPriceAlternateMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashPriceAlternateMethodIDRef = item.Attributes["id"].Name;
                 CashPriceMethod ob = CashPriceMethod();
                 IDManager.SetID(cashPriceAlternateMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashPriceAlternateMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashPriceAlternateMethod = new CashPriceMethod(item);
             }
         }
     }
     
 
     XmlNodeList parYieldCurveAdjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveAdjustedMethod");
     if (parYieldCurveAdjustedMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in parYieldCurveAdjustedMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 parYieldCurveAdjustedMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(parYieldCurveAdjustedMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 parYieldCurveAdjustedMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 parYieldCurveAdjustedMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
     XmlNodeList zeroCouponYieldAdjustedMethodNodeList = xmlNode.SelectNodes("zeroCouponYieldAdjustedMethod");
     if (zeroCouponYieldAdjustedMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in zeroCouponYieldAdjustedMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 zeroCouponYieldAdjustedMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 zeroCouponYieldAdjustedMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 zeroCouponYieldAdjustedMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
     XmlNodeList parYieldCurveUnadjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveUnadjustedMethod");
     if (parYieldCurveUnadjustedMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in parYieldCurveUnadjustedMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 parYieldCurveUnadjustedMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(parYieldCurveUnadjustedMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 parYieldCurveUnadjustedMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 parYieldCurveUnadjustedMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
     XmlNodeList crossCurrencyMethodNodeList = xmlNode.SelectNodes("crossCurrencyMethod");
     if (crossCurrencyMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in crossCurrencyMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 crossCurrencyMethodIDRef = item.Attributes["id"].Name;
                 CrossCurrencyMethod ob = CrossCurrencyMethod();
                 IDManager.SetID(crossCurrencyMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 crossCurrencyMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 crossCurrencyMethod = new CrossCurrencyMethod(item);
             }
         }
     }
     
 
     XmlNodeList collateralizedCashPriceMethodNodeList = xmlNode.SelectNodes("collateralizedCashPriceMethod");
     if (collateralizedCashPriceMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in collateralizedCashPriceMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 collateralizedCashPriceMethodIDRef = item.Attributes["id"].Name;
                 YieldCurveMethod ob = YieldCurveMethod();
                 IDManager.SetID(collateralizedCashPriceMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 collateralizedCashPriceMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 collateralizedCashPriceMethod = new YieldCurveMethod(item);
             }
         }
     }
     
 
 }
        public ExerciseFee(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;
                        NotionalReference ob = NotionalReference();
                        IDManager.SetID(notionalReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notionalReference = new NotionalReference(item);
                    }
                }
            }


            XmlNodeList feeAmountNodeList = xmlNode.SelectNodes("feeAmount");

            if (feeAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in feeAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        feeAmountIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(feeAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        feeAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        feeAmount = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList feeRateNodeList = xmlNode.SelectNodes("feeRate");

            if (feeRateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in feeRateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        feeRateIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(feeRateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        feeRateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        feeRate = new XsdTypeDecimal(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 Fra(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 adjustedEffectiveDateNodeList = xmlNode.SelectNodes("adjustedEffectiveDate");
     if (adjustedEffectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedEffectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedEffectiveDateIDRef = item.Attributes["id"].Name;
                 RequiredIdentifierDate ob = RequiredIdentifierDate();
                 IDManager.SetID(adjustedEffectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedEffectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedEffectiveDate = new RequiredIdentifierDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedTerminationDateNodeList = xmlNode.SelectNodes("adjustedTerminationDate");
     if (adjustedTerminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedTerminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedTerminationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedTerminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedTerminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedTerminationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList fixingDateOffsetNodeList = xmlNode.SelectNodes("fixingDateOffset");
     if (fixingDateOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDateOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDateOffsetIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDateOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDateOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDateOffset = new RelativeDateOffset(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 calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays");
     if (calculationPeriodNumberOfDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name;
                 XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item);
             }
         }
     }
     
 
     XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");
     if (notionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(notionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notional = new Money(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;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     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");
     
     foreach (XmlNode item in indexTenorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexTenorIDRef = item.Attributes["id"].Name;
                 List<Period> ob = new List<Period>();
                 ob.Add(new Period(item));
                 IDManager.SetID(indexTenorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexTenorIDRef = item.Attributes["href"].Name;
             }
             else
             {
             indexTenor.Add(new Period(item));
             }
         }
     }
     
 
     XmlNodeList fraDiscountingNodeList = xmlNode.SelectNodes("fraDiscounting");
     if (fraDiscountingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fraDiscountingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fraDiscountingIDRef = item.Attributes["id"].Name;
                 FraDiscountingEnum ob = FraDiscountingEnum();
                 IDManager.SetID(fraDiscountingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fraDiscountingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fraDiscounting = new FraDiscountingEnum(item);
             }
         }
     }
     
 
 }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");
     if (rateCutOffDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateCutOffDaysOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");
     if (resetDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
 public CashSettlementPaymentDate(XmlNode xmlNode)
 {
     XmlNodeList adjustableDatesNodeList = xmlNode.SelectNodes("adjustableDates");
     if (adjustableDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustableDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustableDatesIDRef = item.Attributes["id"].Name;
                 AdjustableDates ob = AdjustableDates();
                 IDManager.SetID(adjustableDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustableDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustableDates = new AdjustableDates(item);
             }
         }
     }
     
 
     XmlNodeList relativeDateNodeList = xmlNode.SelectNodes("relativeDate");
     if (relativeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in relativeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relativeDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(relativeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relativeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 relativeDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList businessDateRangeNodeList = xmlNode.SelectNodes("businessDateRange");
     if (businessDateRangeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessDateRangeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessDateRangeIDRef = item.Attributes["id"].Name;
                 BusinessDateRange ob = BusinessDateRange();
                 IDManager.SetID(businessDateRangeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessDateRangeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessDateRange = new BusinessDateRange(item);
             }
         }
     }
     
 
 }
 public CashSettlement(XmlNode xmlNode)
 {
     XmlNode cashSettlementValuationTimeNode = xmlNode.SelectSingleNode("cashSettlementValuationTime");
     
     if (cashSettlementValuationTimeNode != null)
     {
         if (cashSettlementValuationTimeNode.Attributes["href"] != null || cashSettlementValuationTimeNode.Attributes["id"] != null) 
         {
             if (cashSettlementValuationTimeNode.Attributes["id"] != null) 
             {
                 cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["id"].Value;
                 BusinessCenterTime ob = new BusinessCenterTime(cashSettlementValuationTimeNode);
                 IDManager.SetID(cashSettlementValuationTimeIDRef_, ob);
             }
             else if (cashSettlementValuationTimeNode.Attributes["href"] != null)
             {
                 cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
             }
         }
         else
         {
             cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
         }
     }
     
 
     XmlNode cashSettlementValuationDateNode = xmlNode.SelectSingleNode("cashSettlementValuationDate");
     
     if (cashSettlementValuationDateNode != null)
     {
         if (cashSettlementValuationDateNode.Attributes["href"] != null || cashSettlementValuationDateNode.Attributes["id"] != null) 
         {
             if (cashSettlementValuationDateNode.Attributes["id"] != null) 
             {
                 cashSettlementValuationDateIDRef_ = cashSettlementValuationDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(cashSettlementValuationDateNode);
                 IDManager.SetID(cashSettlementValuationDateIDRef_, ob);
             }
             else if (cashSettlementValuationDateNode.Attributes["href"] != null)
             {
                 cashSettlementValuationDateIDRef_ = cashSettlementValuationDateNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementValuationDate_ = new RelativeDateOffset(cashSettlementValuationDateNode);
             }
         }
         else
         {
             cashSettlementValuationDate_ = new RelativeDateOffset(cashSettlementValuationDateNode);
         }
     }
     
 
     XmlNode cashSettlementPaymentDateNode = xmlNode.SelectSingleNode("cashSettlementPaymentDate");
     
     if (cashSettlementPaymentDateNode != null)
     {
         if (cashSettlementPaymentDateNode.Attributes["href"] != null || cashSettlementPaymentDateNode.Attributes["id"] != null) 
         {
             if (cashSettlementPaymentDateNode.Attributes["id"] != null) 
             {
                 cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["id"].Value;
                 CashSettlementPaymentDate ob = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                 IDManager.SetID(cashSettlementPaymentDateIDRef_, ob);
             }
             else if (cashSettlementPaymentDateNode.Attributes["href"] != null)
             {
                 cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
             }
         }
         else
         {
             cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
         }
     }
     
 
     XmlNode cashPriceMethodNode = xmlNode.SelectSingleNode("cashPriceMethod");
     
     if (cashPriceMethodNode != null)
     {
         if (cashPriceMethodNode.Attributes["href"] != null || cashPriceMethodNode.Attributes["id"] != null) 
         {
             if (cashPriceMethodNode.Attributes["id"] != null) 
             {
                 cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["id"].Value;
                 CashPriceMethod ob = new CashPriceMethod(cashPriceMethodNode);
                 IDManager.SetID(cashPriceMethodIDRef_, ob);
             }
             else if (cashPriceMethodNode.Attributes["href"] != null)
             {
                 cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["href"].Value;
             }
             else
             {
                 cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
             }
         }
         else
         {
             cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
         }
     }
     
 
     XmlNode cashPriceAlternateMethodNode = xmlNode.SelectSingleNode("cashPriceAlternateMethod");
     
     if (cashPriceAlternateMethodNode != null)
     {
         if (cashPriceAlternateMethodNode.Attributes["href"] != null || cashPriceAlternateMethodNode.Attributes["id"] != null) 
         {
             if (cashPriceAlternateMethodNode.Attributes["id"] != null) 
             {
                 cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["id"].Value;
                 CashPriceMethod ob = new CashPriceMethod(cashPriceAlternateMethodNode);
                 IDManager.SetID(cashPriceAlternateMethodIDRef_, ob);
             }
             else if (cashPriceAlternateMethodNode.Attributes["href"] != null)
             {
                 cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["href"].Value;
             }
             else
             {
                 cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
             }
         }
         else
         {
             cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
         }
     }
     
 
     XmlNode parYieldCurveAdjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveAdjustedMethod");
     
     if (parYieldCurveAdjustedMethodNode != null)
     {
         if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null || parYieldCurveAdjustedMethodNode.Attributes["id"] != null) 
         {
             if (parYieldCurveAdjustedMethodNode.Attributes["id"] != null) 
             {
                 parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                 IDManager.SetID(parYieldCurveAdjustedMethodIDRef_, ob);
             }
             else if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null)
             {
                 parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["href"].Value;
             }
             else
             {
                 parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
             }
         }
         else
         {
             parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
         }
     }
     
 
     XmlNode zeroCouponYieldAdjustedMethodNode = xmlNode.SelectSingleNode("zeroCouponYieldAdjustedMethod");
     
     if (zeroCouponYieldAdjustedMethodNode != null)
     {
         if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null || zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null) 
         {
             if (zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null) 
             {
                 zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                 IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef_, ob);
             }
             else if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null)
             {
                 zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["href"].Value;
             }
             else
             {
                 zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
             }
         }
         else
         {
             zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
         }
     }
     
 
     XmlNode parYieldCurveUnadjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveUnadjustedMethod");
     
     if (parYieldCurveUnadjustedMethodNode != null)
     {
         if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null || parYieldCurveUnadjustedMethodNode.Attributes["id"] != null) 
         {
             if (parYieldCurveUnadjustedMethodNode.Attributes["id"] != null) 
             {
                 parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                 IDManager.SetID(parYieldCurveUnadjustedMethodIDRef_, ob);
             }
             else if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null)
             {
                 parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["href"].Value;
             }
             else
             {
                 parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
             }
         }
         else
         {
             parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
         }
     }
     
 
     XmlNode crossCurrencyMethodNode = xmlNode.SelectSingleNode("crossCurrencyMethod");
     
     if (crossCurrencyMethodNode != null)
     {
         if (crossCurrencyMethodNode.Attributes["href"] != null || crossCurrencyMethodNode.Attributes["id"] != null) 
         {
             if (crossCurrencyMethodNode.Attributes["id"] != null) 
             {
                 crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["id"].Value;
                 CrossCurrencyMethod ob = new CrossCurrencyMethod(crossCurrencyMethodNode);
                 IDManager.SetID(crossCurrencyMethodIDRef_, ob);
             }
             else if (crossCurrencyMethodNode.Attributes["href"] != null)
             {
                 crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["href"].Value;
             }
             else
             {
                 crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
             }
         }
         else
         {
             crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
         }
     }
     
 
     XmlNode collateralizedCashPriceMethodNode = xmlNode.SelectSingleNode("collateralizedCashPriceMethod");
     
     if (collateralizedCashPriceMethodNode != null)
     {
         if (collateralizedCashPriceMethodNode.Attributes["href"] != null || collateralizedCashPriceMethodNode.Attributes["id"] != null) 
         {
             if (collateralizedCashPriceMethodNode.Attributes["id"] != null) 
             {
                 collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["id"].Value;
                 YieldCurveMethod ob = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                 IDManager.SetID(collateralizedCashPriceMethodIDRef_, ob);
             }
             else if (collateralizedCashPriceMethodNode.Attributes["href"] != null)
             {
                 collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["href"].Value;
             }
             else
             {
                 collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
             }
         }
         else
         {
             collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
         }
     }
     
 
 }
        public CashSettlement(XmlNode xmlNode)
        {
            XmlNode cashSettlementValuationTimeNode = xmlNode.SelectSingleNode("cashSettlementValuationTime");

            if (cashSettlementValuationTimeNode != null)
            {
                if (cashSettlementValuationTimeNode.Attributes["href"] != null || cashSettlementValuationTimeNode.Attributes["id"] != null)
                {
                    if (cashSettlementValuationTimeNode.Attributes["id"] != null)
                    {
                        cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["id"].Value;
                        BusinessCenterTime ob = new BusinessCenterTime(cashSettlementValuationTimeNode);
                        IDManager.SetID(cashSettlementValuationTimeIDRef_, ob);
                    }
                    else if (cashSettlementValuationTimeNode.Attributes["href"] != null)
                    {
                        cashSettlementValuationTimeIDRef_ = cashSettlementValuationTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
                    }
                }
                else
                {
                    cashSettlementValuationTime_ = new BusinessCenterTime(cashSettlementValuationTimeNode);
                }
            }


            XmlNode cashSettlementValuationDateNode = xmlNode.SelectSingleNode("cashSettlementValuationDate");

            if (cashSettlementValuationDateNode != null)
            {
                if (cashSettlementValuationDateNode.Attributes["href"] != null || cashSettlementValuationDateNode.Attributes["id"] != null)
                {
                    if (cashSettlementValuationDateNode.Attributes["id"] != null)
                    {
                        cashSettlementValuationDateIDRef_ = cashSettlementValuationDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(cashSettlementValuationDateNode);
                        IDManager.SetID(cashSettlementValuationDateIDRef_, ob);
                    }
                    else if (cashSettlementValuationDateNode.Attributes["href"] != null)
                    {
                        cashSettlementValuationDateIDRef_ = cashSettlementValuationDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementValuationDate_ = new RelativeDateOffset(cashSettlementValuationDateNode);
                    }
                }
                else
                {
                    cashSettlementValuationDate_ = new RelativeDateOffset(cashSettlementValuationDateNode);
                }
            }


            XmlNode cashSettlementPaymentDateNode = xmlNode.SelectSingleNode("cashSettlementPaymentDate");

            if (cashSettlementPaymentDateNode != null)
            {
                if (cashSettlementPaymentDateNode.Attributes["href"] != null || cashSettlementPaymentDateNode.Attributes["id"] != null)
                {
                    if (cashSettlementPaymentDateNode.Attributes["id"] != null)
                    {
                        cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["id"].Value;
                        CashSettlementPaymentDate ob = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                        IDManager.SetID(cashSettlementPaymentDateIDRef_, ob);
                    }
                    else if (cashSettlementPaymentDateNode.Attributes["href"] != null)
                    {
                        cashSettlementPaymentDateIDRef_ = cashSettlementPaymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                    }
                }
                else
                {
                    cashSettlementPaymentDate_ = new CashSettlementPaymentDate(cashSettlementPaymentDateNode);
                }
            }


            XmlNode cashPriceMethodNode = xmlNode.SelectSingleNode("cashPriceMethod");

            if (cashPriceMethodNode != null)
            {
                if (cashPriceMethodNode.Attributes["href"] != null || cashPriceMethodNode.Attributes["id"] != null)
                {
                    if (cashPriceMethodNode.Attributes["id"] != null)
                    {
                        cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["id"].Value;
                        CashPriceMethod ob = new CashPriceMethod(cashPriceMethodNode);
                        IDManager.SetID(cashPriceMethodIDRef_, ob);
                    }
                    else if (cashPriceMethodNode.Attributes["href"] != null)
                    {
                        cashPriceMethodIDRef_ = cashPriceMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
                    }
                }
                else
                {
                    cashPriceMethod_ = new CashPriceMethod(cashPriceMethodNode);
                }
            }


            XmlNode cashPriceAlternateMethodNode = xmlNode.SelectSingleNode("cashPriceAlternateMethod");

            if (cashPriceAlternateMethodNode != null)
            {
                if (cashPriceAlternateMethodNode.Attributes["href"] != null || cashPriceAlternateMethodNode.Attributes["id"] != null)
                {
                    if (cashPriceAlternateMethodNode.Attributes["id"] != null)
                    {
                        cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["id"].Value;
                        CashPriceMethod ob = new CashPriceMethod(cashPriceAlternateMethodNode);
                        IDManager.SetID(cashPriceAlternateMethodIDRef_, ob);
                    }
                    else if (cashPriceAlternateMethodNode.Attributes["href"] != null)
                    {
                        cashPriceAlternateMethodIDRef_ = cashPriceAlternateMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
                    }
                }
                else
                {
                    cashPriceAlternateMethod_ = new CashPriceMethod(cashPriceAlternateMethodNode);
                }
            }


            XmlNode parYieldCurveAdjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveAdjustedMethod");

            if (parYieldCurveAdjustedMethodNode != null)
            {
                if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null || parYieldCurveAdjustedMethodNode.Attributes["id"] != null)
                {
                    if (parYieldCurveAdjustedMethodNode.Attributes["id"] != null)
                    {
                        parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                        IDManager.SetID(parYieldCurveAdjustedMethodIDRef_, ob);
                    }
                    else if (parYieldCurveAdjustedMethodNode.Attributes["href"] != null)
                    {
                        parYieldCurveAdjustedMethodIDRef_ = parYieldCurveAdjustedMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                    }
                }
                else
                {
                    parYieldCurveAdjustedMethod_ = new YieldCurveMethod(parYieldCurveAdjustedMethodNode);
                }
            }


            XmlNode zeroCouponYieldAdjustedMethodNode = xmlNode.SelectSingleNode("zeroCouponYieldAdjustedMethod");

            if (zeroCouponYieldAdjustedMethodNode != null)
            {
                if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null || zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null)
                {
                    if (zeroCouponYieldAdjustedMethodNode.Attributes["id"] != null)
                    {
                        zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                        IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef_, ob);
                    }
                    else if (zeroCouponYieldAdjustedMethodNode.Attributes["href"] != null)
                    {
                        zeroCouponYieldAdjustedMethodIDRef_ = zeroCouponYieldAdjustedMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                    }
                }
                else
                {
                    zeroCouponYieldAdjustedMethod_ = new YieldCurveMethod(zeroCouponYieldAdjustedMethodNode);
                }
            }


            XmlNode parYieldCurveUnadjustedMethodNode = xmlNode.SelectSingleNode("parYieldCurveUnadjustedMethod");

            if (parYieldCurveUnadjustedMethodNode != null)
            {
                if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null || parYieldCurveUnadjustedMethodNode.Attributes["id"] != null)
                {
                    if (parYieldCurveUnadjustedMethodNode.Attributes["id"] != null)
                    {
                        parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                        IDManager.SetID(parYieldCurveUnadjustedMethodIDRef_, ob);
                    }
                    else if (parYieldCurveUnadjustedMethodNode.Attributes["href"] != null)
                    {
                        parYieldCurveUnadjustedMethodIDRef_ = parYieldCurveUnadjustedMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                    }
                }
                else
                {
                    parYieldCurveUnadjustedMethod_ = new YieldCurveMethod(parYieldCurveUnadjustedMethodNode);
                }
            }


            XmlNode crossCurrencyMethodNode = xmlNode.SelectSingleNode("crossCurrencyMethod");

            if (crossCurrencyMethodNode != null)
            {
                if (crossCurrencyMethodNode.Attributes["href"] != null || crossCurrencyMethodNode.Attributes["id"] != null)
                {
                    if (crossCurrencyMethodNode.Attributes["id"] != null)
                    {
                        crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["id"].Value;
                        CrossCurrencyMethod ob = new CrossCurrencyMethod(crossCurrencyMethodNode);
                        IDManager.SetID(crossCurrencyMethodIDRef_, ob);
                    }
                    else if (crossCurrencyMethodNode.Attributes["href"] != null)
                    {
                        crossCurrencyMethodIDRef_ = crossCurrencyMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
                    }
                }
                else
                {
                    crossCurrencyMethod_ = new CrossCurrencyMethod(crossCurrencyMethodNode);
                }
            }


            XmlNode collateralizedCashPriceMethodNode = xmlNode.SelectSingleNode("collateralizedCashPriceMethod");

            if (collateralizedCashPriceMethodNode != null)
            {
                if (collateralizedCashPriceMethodNode.Attributes["href"] != null || collateralizedCashPriceMethodNode.Attributes["id"] != null)
                {
                    if (collateralizedCashPriceMethodNode.Attributes["id"] != null)
                    {
                        collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["id"].Value;
                        YieldCurveMethod ob = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                        IDManager.SetID(collateralizedCashPriceMethodIDRef_, ob);
                    }
                    else if (collateralizedCashPriceMethodNode.Attributes["href"] != null)
                    {
                        collateralizedCashPriceMethodIDRef_ = collateralizedCashPriceMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                    }
                }
                else
                {
                    collateralizedCashPriceMethod_ = new YieldCurveMethod(collateralizedCashPriceMethodNode);
                }
            }
        }
 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 CashSettlement(XmlNode xmlNode)
        {
            XmlNodeList cashSettlementValuationTimeNodeList = xmlNode.SelectNodes("cashSettlementValuationTime");

            if (cashSettlementValuationTimeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in cashSettlementValuationTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementValuationTimeIDRef = item.Attributes["id"].Name;
                        BusinessCenterTime ob = BusinessCenterTime();
                        IDManager.SetID(cashSettlementValuationTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementValuationTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementValuationTime = new BusinessCenterTime(item);
                    }
                }
            }


            XmlNodeList cashSettlementValuationDateNodeList = xmlNode.SelectNodes("cashSettlementValuationDate");

            if (cashSettlementValuationDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in cashSettlementValuationDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementValuationDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(cashSettlementValuationDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementValuationDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementValuationDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList cashSettlementPaymentDateNodeList = xmlNode.SelectNodes("cashSettlementPaymentDate");

            if (cashSettlementPaymentDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in cashSettlementPaymentDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashSettlementPaymentDateIDRef = item.Attributes["id"].Name;
                        CashSettlementPaymentDate ob = CashSettlementPaymentDate();
                        IDManager.SetID(cashSettlementPaymentDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashSettlementPaymentDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashSettlementPaymentDate = new CashSettlementPaymentDate(item);
                    }
                }
            }


            XmlNodeList cashPriceMethodNodeList = xmlNode.SelectNodes("cashPriceMethod");

            if (cashPriceMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in cashPriceMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashPriceMethodIDRef = item.Attributes["id"].Name;
                        CashPriceMethod ob = CashPriceMethod();
                        IDManager.SetID(cashPriceMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashPriceMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashPriceMethod = new CashPriceMethod(item);
                    }
                }
            }


            XmlNodeList cashPriceAlternateMethodNodeList = xmlNode.SelectNodes("cashPriceAlternateMethod");

            if (cashPriceAlternateMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in cashPriceAlternateMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashPriceAlternateMethodIDRef = item.Attributes["id"].Name;
                        CashPriceMethod ob = CashPriceMethod();
                        IDManager.SetID(cashPriceAlternateMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashPriceAlternateMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashPriceAlternateMethod = new CashPriceMethod(item);
                    }
                }
            }


            XmlNodeList parYieldCurveAdjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveAdjustedMethod");

            if (parYieldCurveAdjustedMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in parYieldCurveAdjustedMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        parYieldCurveAdjustedMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(parYieldCurveAdjustedMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        parYieldCurveAdjustedMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        parYieldCurveAdjustedMethod = new YieldCurveMethod(item);
                    }
                }
            }


            XmlNodeList zeroCouponYieldAdjustedMethodNodeList = xmlNode.SelectNodes("zeroCouponYieldAdjustedMethod");

            if (zeroCouponYieldAdjustedMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in zeroCouponYieldAdjustedMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        zeroCouponYieldAdjustedMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(zeroCouponYieldAdjustedMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        zeroCouponYieldAdjustedMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        zeroCouponYieldAdjustedMethod = new YieldCurveMethod(item);
                    }
                }
            }


            XmlNodeList parYieldCurveUnadjustedMethodNodeList = xmlNode.SelectNodes("parYieldCurveUnadjustedMethod");

            if (parYieldCurveUnadjustedMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in parYieldCurveUnadjustedMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        parYieldCurveUnadjustedMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(parYieldCurveUnadjustedMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        parYieldCurveUnadjustedMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        parYieldCurveUnadjustedMethod = new YieldCurveMethod(item);
                    }
                }
            }


            XmlNodeList crossCurrencyMethodNodeList = xmlNode.SelectNodes("crossCurrencyMethod");

            if (crossCurrencyMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in crossCurrencyMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        crossCurrencyMethodIDRef = item.Attributes["id"].Name;
                        CrossCurrencyMethod ob = CrossCurrencyMethod();
                        IDManager.SetID(crossCurrencyMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        crossCurrencyMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        crossCurrencyMethod = new CrossCurrencyMethod(item);
                    }
                }
            }


            XmlNodeList collateralizedCashPriceMethodNodeList = xmlNode.SelectNodes("collateralizedCashPriceMethod");

            if (collateralizedCashPriceMethodNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in collateralizedCashPriceMethodNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        collateralizedCashPriceMethodIDRef = item.Attributes["id"].Name;
                        YieldCurveMethod ob = YieldCurveMethod();
                        IDManager.SetID(collateralizedCashPriceMethodIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        collateralizedCashPriceMethodIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        collateralizedCashPriceMethod = new YieldCurveMethod(item);
                    }
                }
            }
        }
 public CalculationPeriodDates(XmlNode xmlNode)
 {
     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;
                 AdjustableDate ob = new AdjustableDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableDate(effectiveDateNode);
         }
     }
     
 
     XmlNode relativeEffectiveDateNode = xmlNode.SelectSingleNode("relativeEffectiveDate");
     
     if (relativeEffectiveDateNode != null)
     {
         if (relativeEffectiveDateNode.Attributes["href"] != null || relativeEffectiveDateNode.Attributes["id"] != null) 
         {
             if (relativeEffectiveDateNode.Attributes["id"] != null) 
             {
                 relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["id"].Value;
                 AdjustedRelativeDateOffset ob = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
                 IDManager.SetID(relativeEffectiveDateIDRef_, ob);
             }
             else if (relativeEffectiveDateNode.Attributes["href"] != null)
             {
                 relativeEffectiveDateIDRef_ = relativeEffectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
             }
         }
         else
         {
             relativeEffectiveDate_ = new AdjustedRelativeDateOffset(relativeEffectiveDateNode);
         }
     }
     
 
     XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");
     
     if (terminationDateNode != null)
     {
         if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) 
         {
             if (terminationDateNode.Attributes["id"] != null) 
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(terminationDateNode);
                 IDManager.SetID(terminationDateIDRef_, ob);
             }
             else if (terminationDateNode.Attributes["href"] != null)
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 terminationDate_ = new AdjustableDate(terminationDateNode);
             }
         }
         else
         {
             terminationDate_ = new AdjustableDate(terminationDateNode);
         }
     }
     
 
     XmlNode relativeTerminationDateNode = xmlNode.SelectSingleNode("relativeTerminationDate");
     
     if (relativeTerminationDateNode != null)
     {
         if (relativeTerminationDateNode.Attributes["href"] != null || relativeTerminationDateNode.Attributes["id"] != null) 
         {
             if (relativeTerminationDateNode.Attributes["id"] != null) 
             {
                 relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeTerminationDateNode);
                 IDManager.SetID(relativeTerminationDateIDRef_, ob);
             }
             else if (relativeTerminationDateNode.Attributes["href"] != null)
             {
                 relativeTerminationDateIDRef_ = relativeTerminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
             }
         }
         else
         {
             relativeTerminationDate_ = new RelativeDateOffset(relativeTerminationDateNode);
         }
     }
     
 
     XmlNode calculationPeriodDatesAdjustmentsNode = xmlNode.SelectSingleNode("calculationPeriodDatesAdjustments");
     
     if (calculationPeriodDatesAdjustmentsNode != null)
     {
         if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null || calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
                 IDManager.SetID(calculationPeriodDatesAdjustmentsIDRef_, ob);
             }
             else if (calculationPeriodDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesAdjustmentsIDRef_ = calculationPeriodDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
             }
         }
         else
         {
             calculationPeriodDatesAdjustments_ = new BusinessDayAdjustments(calculationPeriodDatesAdjustmentsNode);
         }
     }
     
 
     XmlNode firstPeriodStartDateNode = xmlNode.SelectSingleNode("firstPeriodStartDate");
     
     if (firstPeriodStartDateNode != null)
     {
         if (firstPeriodStartDateNode.Attributes["href"] != null || firstPeriodStartDateNode.Attributes["id"] != null) 
         {
             if (firstPeriodStartDateNode.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(firstPeriodStartDateNode);
                 IDManager.SetID(firstPeriodStartDateIDRef_, ob);
             }
             else if (firstPeriodStartDateNode.Attributes["href"] != null)
             {
                 firstPeriodStartDateIDRef_ = firstPeriodStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
             }
         }
         else
         {
             firstPeriodStartDate_ = new AdjustableDate(firstPeriodStartDateNode);
         }
     }
     
 
     XmlNode firstRegularPeriodStartDateNode = xmlNode.SelectSingleNode("firstRegularPeriodStartDate");
     
     if (firstRegularPeriodStartDateNode != null)
     {
         if (firstRegularPeriodStartDateNode.Attributes["href"] != null || firstRegularPeriodStartDateNode.Attributes["id"] != null) 
         {
             if (firstRegularPeriodStartDateNode.Attributes["id"] != null) 
             {
                 firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstRegularPeriodStartDateNode);
                 IDManager.SetID(firstRegularPeriodStartDateIDRef_, ob);
             }
             else if (firstRegularPeriodStartDateNode.Attributes["href"] != null)
             {
                 firstRegularPeriodStartDateIDRef_ = firstRegularPeriodStartDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode);
             }
         }
         else
         {
             firstRegularPeriodStartDate_ = new XsdTypeDate(firstRegularPeriodStartDateNode);
         }
     }
     
 
     XmlNode firstCompoundingPeriodEndDateNode = xmlNode.SelectSingleNode("firstCompoundingPeriodEndDate");
     
     if (firstCompoundingPeriodEndDateNode != null)
     {
         if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null || firstCompoundingPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (firstCompoundingPeriodEndDateNode.Attributes["id"] != null) 
             {
                 firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
                 IDManager.SetID(firstCompoundingPeriodEndDateIDRef_, ob);
             }
             else if (firstCompoundingPeriodEndDateNode.Attributes["href"] != null)
             {
                 firstCompoundingPeriodEndDateIDRef_ = firstCompoundingPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
             }
         }
         else
         {
             firstCompoundingPeriodEndDate_ = new XsdTypeDate(firstCompoundingPeriodEndDateNode);
         }
     }
     
 
     XmlNode lastRegularPeriodEndDateNode = xmlNode.SelectSingleNode("lastRegularPeriodEndDate");
     
     if (lastRegularPeriodEndDateNode != null)
     {
         if (lastRegularPeriodEndDateNode.Attributes["href"] != null || lastRegularPeriodEndDateNode.Attributes["id"] != null) 
         {
             if (lastRegularPeriodEndDateNode.Attributes["id"] != null) 
             {
                 lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(lastRegularPeriodEndDateNode);
                 IDManager.SetID(lastRegularPeriodEndDateIDRef_, ob);
             }
             else if (lastRegularPeriodEndDateNode.Attributes["href"] != null)
             {
                 lastRegularPeriodEndDateIDRef_ = lastRegularPeriodEndDateNode.Attributes["href"].Value;
             }
             else
             {
                 lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode);
             }
         }
         else
         {
             lastRegularPeriodEndDate_ = new XsdTypeDate(lastRegularPeriodEndDateNode);
         }
     }
     
 
     XmlNode stubPeriodTypeNode = xmlNode.SelectSingleNode("stubPeriodType");
     
     if (stubPeriodTypeNode != null)
     {
         if (stubPeriodTypeNode.Attributes["href"] != null || stubPeriodTypeNode.Attributes["id"] != null) 
         {
             if (stubPeriodTypeNode.Attributes["id"] != null) 
             {
                 stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["id"].Value;
                 StubPeriodTypeEnum ob = new StubPeriodTypeEnum(stubPeriodTypeNode);
                 IDManager.SetID(stubPeriodTypeIDRef_, ob);
             }
             else if (stubPeriodTypeNode.Attributes["href"] != null)
             {
                 stubPeriodTypeIDRef_ = stubPeriodTypeNode.Attributes["href"].Value;
             }
             else
             {
                 stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
             }
         }
         else
         {
             stubPeriodType_ = new StubPeriodTypeEnum(stubPeriodTypeNode);
         }
     }
     
 
     XmlNode calculationPeriodFrequencyNode = xmlNode.SelectSingleNode("calculationPeriodFrequency");
     
     if (calculationPeriodFrequencyNode != null)
     {
         if (calculationPeriodFrequencyNode.Attributes["href"] != null || calculationPeriodFrequencyNode.Attributes["id"] != null) 
         {
             if (calculationPeriodFrequencyNode.Attributes["id"] != null) 
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["id"].Value;
                 CalculationPeriodFrequency ob = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
                 IDManager.SetID(calculationPeriodFrequencyIDRef_, ob);
             }
             else if (calculationPeriodFrequencyNode.Attributes["href"] != null)
             {
                 calculationPeriodFrequencyIDRef_ = calculationPeriodFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
             }
         }
         else
         {
             calculationPeriodFrequency_ = new CalculationPeriodFrequency(calculationPeriodFrequencyNode);
         }
     }
     
 
 }
 public CashSettlementPaymentDate(XmlNode xmlNode)
 {
     XmlNode adjustableDatesNode = xmlNode.SelectSingleNode("adjustableDates");
     
     if (adjustableDatesNode != null)
     {
         if (adjustableDatesNode.Attributes["href"] != null || adjustableDatesNode.Attributes["id"] != null) 
         {
             if (adjustableDatesNode.Attributes["id"] != null) 
             {
                 adjustableDatesIDRef_ = adjustableDatesNode.Attributes["id"].Value;
                 AdjustableDates ob = new AdjustableDates(adjustableDatesNode);
                 IDManager.SetID(adjustableDatesIDRef_, ob);
             }
             else if (adjustableDatesNode.Attributes["href"] != null)
             {
                 adjustableDatesIDRef_ = adjustableDatesNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDates_ = new AdjustableDates(adjustableDatesNode);
             }
         }
         else
         {
             adjustableDates_ = new AdjustableDates(adjustableDatesNode);
         }
     }
     
 
     XmlNode relativeDateNode = xmlNode.SelectSingleNode("relativeDate");
     
     if (relativeDateNode != null)
     {
         if (relativeDateNode.Attributes["href"] != null || relativeDateNode.Attributes["id"] != null) 
         {
             if (relativeDateNode.Attributes["id"] != null) 
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeDateNode);
                 IDManager.SetID(relativeDateIDRef_, ob);
             }
             else if (relativeDateNode.Attributes["href"] != null)
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeDate_ = new RelativeDateOffset(relativeDateNode);
             }
         }
         else
         {
             relativeDate_ = new RelativeDateOffset(relativeDateNode);
         }
     }
     
 
     XmlNode businessDateRangeNode = xmlNode.SelectSingleNode("businessDateRange");
     
     if (businessDateRangeNode != null)
     {
         if (businessDateRangeNode.Attributes["href"] != null || businessDateRangeNode.Attributes["id"] != null) 
         {
             if (businessDateRangeNode.Attributes["id"] != null) 
             {
                 businessDateRangeIDRef_ = businessDateRangeNode.Attributes["id"].Value;
                 BusinessDateRange ob = new BusinessDateRange(businessDateRangeNode);
                 IDManager.SetID(businessDateRangeIDRef_, ob);
             }
             else if (businessDateRangeNode.Attributes["href"] != null)
             {
                 businessDateRangeIDRef_ = businessDateRangeNode.Attributes["href"].Value;
             }
             else
             {
                 businessDateRange_ = new BusinessDateRange(businessDateRangeNode);
             }
         }
         else
         {
             businessDateRange_ = new BusinessDateRange(businessDateRangeNode);
         }
     }
     
 
 }
        public FxLinkedNotionalSchedule(XmlNode xmlNode)
        {
            XmlNodeList constantNotionalScheduleReferenceNodeList = xmlNode.SelectNodes("constantNotionalScheduleReference");

            if (constantNotionalScheduleReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in constantNotionalScheduleReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        constantNotionalScheduleReferenceIDRef = item.Attributes["id"].Name;
                        NotionalReference ob = NotionalReference();
                        IDManager.SetID(constantNotionalScheduleReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        constantNotionalScheduleReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        constantNotionalScheduleReference = new NotionalReference(item);
                    }
                }
            }


            XmlNodeList initialValueNodeList = xmlNode.SelectNodes("initialValue");

            if (initialValueNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in initialValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialValueIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(initialValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialValue = new XsdTypeDecimal(item);
                    }
                }
            }


            XmlNodeList varyingNotionalCurrencyNodeList = xmlNode.SelectNodes("varyingNotionalCurrency");

            if (varyingNotionalCurrencyNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in varyingNotionalCurrencyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varyingNotionalCurrencyIDRef = item.Attributes["id"].Name;
                        Currency ob = Currency();
                        IDManager.SetID(varyingNotionalCurrencyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varyingNotionalCurrencyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varyingNotionalCurrency = new Currency(item);
                    }
                }
            }


            XmlNodeList varyingNotionalFixingDatesNodeList = xmlNode.SelectNodes("varyingNotionalFixingDates");

            if (varyingNotionalFixingDatesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in varyingNotionalFixingDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varyingNotionalFixingDatesIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(varyingNotionalFixingDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varyingNotionalFixingDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varyingNotionalFixingDates = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList fxSpotRateSourceNodeList = xmlNode.SelectNodes("fxSpotRateSource");

            if (fxSpotRateSourceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in fxSpotRateSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        fxSpotRateSourceIDRef = item.Attributes["id"].Name;
                        FxSpotRateSource ob = FxSpotRateSource();
                        IDManager.SetID(fxSpotRateSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        fxSpotRateSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        fxSpotRateSource = new FxSpotRateSource(item);
                    }
                }
            }


            XmlNodeList varyingNotionalInterimExchangePaymentDatesNodeList = xmlNode.SelectNodes("varyingNotionalInterimExchangePaymentDates");

            if (varyingNotionalInterimExchangePaymentDatesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in varyingNotionalInterimExchangePaymentDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(varyingNotionalInterimExchangePaymentDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varyingNotionalInterimExchangePaymentDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varyingNotionalInterimExchangePaymentDates = new RelativeDateOffset(item);
                    }
                }
            }
        }
 public InterestLegResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 InterestLegCalculationPeriodDatesReference ob = InterestLegCalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new InterestLegCalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 AdjustableDatesOrRelativeDateOffset ob = AdjustableDatesOrRelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new AdjustableDatesOrRelativeDateOffset(item);
             }
         }
     }
     
 
 }
 public Composite(XmlNode xmlNode)
 {
     XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");
     
     if (determinationMethodNode != null)
     {
         if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null) 
         {
             if (determinationMethodNode.Attributes["id"] != null) 
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                 DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                 IDManager.SetID(determinationMethodIDRef_, ob);
             }
             else if (determinationMethodNode.Attributes["href"] != null)
             {
                 determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 determinationMethod_ = new DeterminationMethod(determinationMethodNode);
             }
         }
         else
         {
             determinationMethod_ = new DeterminationMethod(determinationMethodNode);
         }
     }
     
 
     XmlNode relativeDateNode = xmlNode.SelectSingleNode("relativeDate");
     
     if (relativeDateNode != null)
     {
         if (relativeDateNode.Attributes["href"] != null || relativeDateNode.Attributes["id"] != null) 
         {
             if (relativeDateNode.Attributes["id"] != null) 
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(relativeDateNode);
                 IDManager.SetID(relativeDateIDRef_, ob);
             }
             else if (relativeDateNode.Attributes["href"] != null)
             {
                 relativeDateIDRef_ = relativeDateNode.Attributes["href"].Value;
             }
             else
             {
                 relativeDate_ = new RelativeDateOffset(relativeDateNode);
             }
         }
         else
         {
             relativeDate_ = new RelativeDateOffset(relativeDateNode);
         }
     }
     
 
     XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource");
     
     if (fxSpotRateSourceNode != null)
     {
         if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null) 
         {
             if (fxSpotRateSourceNode.Attributes["id"] != null) 
             {
                 fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value;
                 FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode);
                 IDManager.SetID(fxSpotRateSourceIDRef_, ob);
             }
             else if (fxSpotRateSourceNode.Attributes["href"] != null)
             {
                 fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value;
             }
             else
             {
                 fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
             }
         }
         else
         {
             fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
         }
     }
     
 
 }
Example #38
0
        public Composite(XmlNode xmlNode)
        {
            XmlNode determinationMethodNode = xmlNode.SelectSingleNode("determinationMethod");

            if (determinationMethodNode != null)
            {
                if (determinationMethodNode.Attributes["href"] != null || determinationMethodNode.Attributes["id"] != null)
                {
                    if (determinationMethodNode.Attributes["id"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["id"].Value;
                        DeterminationMethod ob = new DeterminationMethod(determinationMethodNode);
                        IDManager.SetID(determinationMethodIDRef_, ob);
                    }
                    else if (determinationMethodNode.Attributes["href"] != null)
                    {
                        determinationMethodIDRef_ = determinationMethodNode.Attributes["href"].Value;
                    }
                    else
                    {
                        determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                    }
                }
                else
                {
                    determinationMethod_ = new DeterminationMethod(determinationMethodNode);
                }
            }


            XmlNode relativeDateNode = xmlNode.SelectSingleNode("relativeDate");

            if (relativeDateNode != null)
            {
                if (relativeDateNode.Attributes["href"] != null || relativeDateNode.Attributes["id"] != null)
                {
                    if (relativeDateNode.Attributes["id"] != null)
                    {
                        relativeDateIDRef_ = relativeDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(relativeDateNode);
                        IDManager.SetID(relativeDateIDRef_, ob);
                    }
                    else if (relativeDateNode.Attributes["href"] != null)
                    {
                        relativeDateIDRef_ = relativeDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relativeDate_ = new RelativeDateOffset(relativeDateNode);
                    }
                }
                else
                {
                    relativeDate_ = new RelativeDateOffset(relativeDateNode);
                }
            }


            XmlNode fxSpotRateSourceNode = xmlNode.SelectSingleNode("fxSpotRateSource");

            if (fxSpotRateSourceNode != null)
            {
                if (fxSpotRateSourceNode.Attributes["href"] != null || fxSpotRateSourceNode.Attributes["id"] != null)
                {
                    if (fxSpotRateSourceNode.Attributes["id"] != null)
                    {
                        fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["id"].Value;
                        FxSpotRateSource ob = new FxSpotRateSource(fxSpotRateSourceNode);
                        IDManager.SetID(fxSpotRateSourceIDRef_, ob);
                    }
                    else if (fxSpotRateSourceNode.Attributes["href"] != null)
                    {
                        fxSpotRateSourceIDRef_ = fxSpotRateSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
                    }
                }
                else
                {
                    fxSpotRateSource_ = new FxSpotRateSource(fxSpotRateSourceNode);
                }
            }
        }
        public CashSettlementPaymentDate(XmlNode xmlNode)
        {
            XmlNode adjustableDatesNode = xmlNode.SelectSingleNode("adjustableDates");

            if (adjustableDatesNode != null)
            {
                if (adjustableDatesNode.Attributes["href"] != null || adjustableDatesNode.Attributes["id"] != null)
                {
                    if (adjustableDatesNode.Attributes["id"] != null)
                    {
                        adjustableDatesIDRef_ = adjustableDatesNode.Attributes["id"].Value;
                        AdjustableDates ob = new AdjustableDates(adjustableDatesNode);
                        IDManager.SetID(adjustableDatesIDRef_, ob);
                    }
                    else if (adjustableDatesNode.Attributes["href"] != null)
                    {
                        adjustableDatesIDRef_ = adjustableDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        adjustableDates_ = new AdjustableDates(adjustableDatesNode);
                    }
                }
                else
                {
                    adjustableDates_ = new AdjustableDates(adjustableDatesNode);
                }
            }


            XmlNode relativeDateNode = xmlNode.SelectSingleNode("relativeDate");

            if (relativeDateNode != null)
            {
                if (relativeDateNode.Attributes["href"] != null || relativeDateNode.Attributes["id"] != null)
                {
                    if (relativeDateNode.Attributes["id"] != null)
                    {
                        relativeDateIDRef_ = relativeDateNode.Attributes["id"].Value;
                        RelativeDateOffset ob = new RelativeDateOffset(relativeDateNode);
                        IDManager.SetID(relativeDateIDRef_, ob);
                    }
                    else if (relativeDateNode.Attributes["href"] != null)
                    {
                        relativeDateIDRef_ = relativeDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        relativeDate_ = new RelativeDateOffset(relativeDateNode);
                    }
                }
                else
                {
                    relativeDate_ = new RelativeDateOffset(relativeDateNode);
                }
            }


            XmlNode businessDateRangeNode = xmlNode.SelectSingleNode("businessDateRange");

            if (businessDateRangeNode != null)
            {
                if (businessDateRangeNode.Attributes["href"] != null || businessDateRangeNode.Attributes["id"] != null)
                {
                    if (businessDateRangeNode.Attributes["id"] != null)
                    {
                        businessDateRangeIDRef_ = businessDateRangeNode.Attributes["id"].Value;
                        BusinessDateRange ob = new BusinessDateRange(businessDateRangeNode);
                        IDManager.SetID(businessDateRangeIDRef_, ob);
                    }
                    else if (businessDateRangeNode.Attributes["href"] != null)
                    {
                        businessDateRangeIDRef_ = businessDateRangeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessDateRange_ = new BusinessDateRange(businessDateRangeNode);
                    }
                }
                else
                {
                    businessDateRange_ = new BusinessDateRange(businessDateRangeNode);
                }
            }
        }
        public CashSettlementPaymentDate(XmlNode xmlNode)
        {
            XmlNodeList adjustableDatesNodeList = xmlNode.SelectNodes("adjustableDates");

            if (adjustableDatesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in adjustableDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        adjustableDatesIDRef = item.Attributes["id"].Name;
                        AdjustableDates ob = AdjustableDates();
                        IDManager.SetID(adjustableDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        adjustableDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        adjustableDates = new AdjustableDates(item);
                    }
                }
            }


            XmlNodeList relativeDateNodeList = xmlNode.SelectNodes("relativeDate");

            if (relativeDateNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in relativeDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        relativeDateIDRef = item.Attributes["id"].Name;
                        RelativeDateOffset ob = RelativeDateOffset();
                        IDManager.SetID(relativeDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        relativeDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        relativeDate = new RelativeDateOffset(item);
                    }
                }
            }


            XmlNodeList businessDateRangeNodeList = xmlNode.SelectNodes("businessDateRange");

            if (businessDateRangeNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in businessDateRangeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessDateRangeIDRef = item.Attributes["id"].Name;
                        BusinessDateRange ob = BusinessDateRange();
                        IDManager.SetID(businessDateRangeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessDateRangeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessDateRange = new BusinessDateRange(item);
                    }
                }
            }
        }