public InterestRateStream(XmlNode xmlNode)
 : base(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 calculationPeriodDatesNode = xmlNode.SelectSingleNode("calculationPeriodDates");
     
     if (calculationPeriodDatesNode != null)
     {
         if (calculationPeriodDatesNode.Attributes["href"] != null || calculationPeriodDatesNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesIDRef_ = calculationPeriodDatesNode.Attributes["id"].Value;
                 CalculationPeriodDates ob = new CalculationPeriodDates(calculationPeriodDatesNode);
                 IDManager.SetID(calculationPeriodDatesIDRef_, ob);
             }
             else if (calculationPeriodDatesNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesIDRef_ = calculationPeriodDatesNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDates_ = new CalculationPeriodDates(calculationPeriodDatesNode);
             }
         }
         else
         {
             calculationPeriodDates_ = new CalculationPeriodDates(calculationPeriodDatesNode);
         }
     }
     
 
     XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");
     
     if (paymentDatesNode != null)
     {
         if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null) 
         {
             if (paymentDatesNode.Attributes["id"] != null) 
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                 PaymentDates ob = new PaymentDates(paymentDatesNode);
                 IDManager.SetID(paymentDatesIDRef_, ob);
             }
             else if (paymentDatesNode.Attributes["href"] != null)
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDates_ = new PaymentDates(paymentDatesNode);
             }
         }
         else
         {
             paymentDates_ = new PaymentDates(paymentDatesNode);
         }
     }
     
 
     XmlNode resetDatesNode = xmlNode.SelectSingleNode("resetDates");
     
     if (resetDatesNode != null)
     {
         if (resetDatesNode.Attributes["href"] != null || resetDatesNode.Attributes["id"] != null) 
         {
             if (resetDatesNode.Attributes["id"] != null) 
             {
                 resetDatesIDRef_ = resetDatesNode.Attributes["id"].Value;
                 ResetDates ob = new ResetDates(resetDatesNode);
                 IDManager.SetID(resetDatesIDRef_, ob);
             }
             else if (resetDatesNode.Attributes["href"] != null)
             {
                 resetDatesIDRef_ = resetDatesNode.Attributes["href"].Value;
             }
             else
             {
                 resetDates_ = new ResetDates(resetDatesNode);
             }
         }
         else
         {
             resetDates_ = new ResetDates(resetDatesNode);
         }
     }
     
 
     XmlNode calculationPeriodAmountNode = xmlNode.SelectSingleNode("calculationPeriodAmount");
     
     if (calculationPeriodAmountNode != null)
     {
         if (calculationPeriodAmountNode.Attributes["href"] != null || calculationPeriodAmountNode.Attributes["id"] != null) 
         {
             if (calculationPeriodAmountNode.Attributes["id"] != null) 
             {
                 calculationPeriodAmountIDRef_ = calculationPeriodAmountNode.Attributes["id"].Value;
                 CalculationPeriodAmount ob = new CalculationPeriodAmount(calculationPeriodAmountNode);
                 IDManager.SetID(calculationPeriodAmountIDRef_, ob);
             }
             else if (calculationPeriodAmountNode.Attributes["href"] != null)
             {
                 calculationPeriodAmountIDRef_ = calculationPeriodAmountNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodAmount_ = new CalculationPeriodAmount(calculationPeriodAmountNode);
             }
         }
         else
         {
             calculationPeriodAmount_ = new CalculationPeriodAmount(calculationPeriodAmountNode);
         }
     }
     
 
     XmlNode stubCalculationPeriodAmountNode = xmlNode.SelectSingleNode("stubCalculationPeriodAmount");
     
     if (stubCalculationPeriodAmountNode != null)
     {
         if (stubCalculationPeriodAmountNode.Attributes["href"] != null || stubCalculationPeriodAmountNode.Attributes["id"] != null) 
         {
             if (stubCalculationPeriodAmountNode.Attributes["id"] != null) 
             {
                 stubCalculationPeriodAmountIDRef_ = stubCalculationPeriodAmountNode.Attributes["id"].Value;
                 StubCalculationPeriodAmount ob = new StubCalculationPeriodAmount(stubCalculationPeriodAmountNode);
                 IDManager.SetID(stubCalculationPeriodAmountIDRef_, ob);
             }
             else if (stubCalculationPeriodAmountNode.Attributes["href"] != null)
             {
                 stubCalculationPeriodAmountIDRef_ = stubCalculationPeriodAmountNode.Attributes["href"].Value;
             }
             else
             {
                 stubCalculationPeriodAmount_ = new StubCalculationPeriodAmount(stubCalculationPeriodAmountNode);
             }
         }
         else
         {
             stubCalculationPeriodAmount_ = new StubCalculationPeriodAmount(stubCalculationPeriodAmountNode);
         }
     }
     
 
     XmlNode principalExchangesNode = xmlNode.SelectSingleNode("principalExchanges");
     
     if (principalExchangesNode != null)
     {
         if (principalExchangesNode.Attributes["href"] != null || principalExchangesNode.Attributes["id"] != null) 
         {
             if (principalExchangesNode.Attributes["id"] != null) 
             {
                 principalExchangesIDRef_ = principalExchangesNode.Attributes["id"].Value;
                 PrincipalExchanges ob = new PrincipalExchanges(principalExchangesNode);
                 IDManager.SetID(principalExchangesIDRef_, ob);
             }
             else if (principalExchangesNode.Attributes["href"] != null)
             {
                 principalExchangesIDRef_ = principalExchangesNode.Attributes["href"].Value;
             }
             else
             {
                 principalExchanges_ = new PrincipalExchanges(principalExchangesNode);
             }
         }
         else
         {
             principalExchanges_ = new PrincipalExchanges(principalExchangesNode);
         }
     }
     
 
     XmlNode cashflowsNode = xmlNode.SelectSingleNode("cashflows");
     
     if (cashflowsNode != null)
     {
         if (cashflowsNode.Attributes["href"] != null || cashflowsNode.Attributes["id"] != null) 
         {
             if (cashflowsNode.Attributes["id"] != null) 
             {
                 cashflowsIDRef_ = cashflowsNode.Attributes["id"].Value;
                 Cashflows ob = new Cashflows(cashflowsNode);
                 IDManager.SetID(cashflowsIDRef_, ob);
             }
             else if (cashflowsNode.Attributes["href"] != null)
             {
                 cashflowsIDRef_ = cashflowsNode.Attributes["href"].Value;
             }
             else
             {
                 cashflows_ = new Cashflows(cashflowsNode);
             }
         }
         else
         {
             cashflows_ = new Cashflows(cashflowsNode);
         }
     }
     
 
     XmlNode settlementProvisionNode = xmlNode.SelectSingleNode("settlementProvision");
     
     if (settlementProvisionNode != null)
     {
         if (settlementProvisionNode.Attributes["href"] != null || settlementProvisionNode.Attributes["id"] != null) 
         {
             if (settlementProvisionNode.Attributes["id"] != null) 
             {
                 settlementProvisionIDRef_ = settlementProvisionNode.Attributes["id"].Value;
                 SettlementProvision ob = new SettlementProvision(settlementProvisionNode);
                 IDManager.SetID(settlementProvisionIDRef_, ob);
             }
             else if (settlementProvisionNode.Attributes["href"] != null)
             {
                 settlementProvisionIDRef_ = settlementProvisionNode.Attributes["href"].Value;
             }
             else
             {
                 settlementProvision_ = new SettlementProvision(settlementProvisionNode);
             }
         }
         else
         {
             settlementProvision_ = new SettlementProvision(settlementProvisionNode);
         }
     }
     
 
     XmlNode formulaNode = xmlNode.SelectSingleNode("formula");
     
     if (formulaNode != null)
     {
         if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null) 
         {
             if (formulaNode.Attributes["id"] != null) 
             {
                 formulaIDRef_ = formulaNode.Attributes["id"].Value;
                 Formula ob = new Formula(formulaNode);
                 IDManager.SetID(formulaIDRef_, ob);
             }
             else if (formulaNode.Attributes["href"] != null)
             {
                 formulaIDRef_ = formulaNode.Attributes["href"].Value;
             }
             else
             {
                 formula_ = new Formula(formulaNode);
             }
         }
         else
         {
             formula_ = new Formula(formulaNode);
         }
     }
     
 
 }
        public InterestRateStream(XmlNode xmlNode)
            : base(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 calculationPeriodDatesNodeList = xmlNode.SelectNodes("calculationPeriodDates");

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

            foreach (XmlNode item in calculationPeriodDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodDatesIDRef = item.Attributes["id"].Name;
                        CalculationPeriodDates ob = CalculationPeriodDates();
                        IDManager.SetID(calculationPeriodDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodDates = new CalculationPeriodDates(item);
                    }
                }
            }


            XmlNodeList paymentDatesNodeList = xmlNode.SelectNodes("paymentDates");

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

            foreach (XmlNode item in paymentDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDatesIDRef = item.Attributes["id"].Name;
                        PaymentDates ob = PaymentDates();
                        IDManager.SetID(paymentDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDates = new PaymentDates(item);
                    }
                }
            }


            XmlNodeList resetDatesNodeList = xmlNode.SelectNodes("resetDates");

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

            foreach (XmlNode item in resetDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        resetDatesIDRef = item.Attributes["id"].Name;
                        ResetDates ob = ResetDates();
                        IDManager.SetID(resetDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        resetDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        resetDates = new ResetDates(item);
                    }
                }
            }


            XmlNodeList calculationPeriodAmountNodeList = xmlNode.SelectNodes("calculationPeriodAmount");

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

            foreach (XmlNode item in calculationPeriodAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        calculationPeriodAmountIDRef = item.Attributes["id"].Name;
                        CalculationPeriodAmount ob = CalculationPeriodAmount();
                        IDManager.SetID(calculationPeriodAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        calculationPeriodAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        calculationPeriodAmount = new CalculationPeriodAmount(item);
                    }
                }
            }


            XmlNodeList stubCalculationPeriodAmountNodeList = xmlNode.SelectNodes("stubCalculationPeriodAmount");

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

            foreach (XmlNode item in stubCalculationPeriodAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stubCalculationPeriodAmountIDRef = item.Attributes["id"].Name;
                        StubCalculationPeriodAmount ob = StubCalculationPeriodAmount();
                        IDManager.SetID(stubCalculationPeriodAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stubCalculationPeriodAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        stubCalculationPeriodAmount = new StubCalculationPeriodAmount(item);
                    }
                }
            }


            XmlNodeList principalExchangesNodeList = xmlNode.SelectNodes("principalExchanges");

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

            foreach (XmlNode item in principalExchangesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        principalExchangesIDRef = item.Attributes["id"].Name;
                        PrincipalExchanges ob = PrincipalExchanges();
                        IDManager.SetID(principalExchangesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        principalExchangesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        principalExchanges = new PrincipalExchanges(item);
                    }
                }
            }


            XmlNodeList cashflowsNodeList = xmlNode.SelectNodes("cashflows");

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

            foreach (XmlNode item in cashflowsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        cashflowsIDRef = item.Attributes["id"].Name;
                        Cashflows ob = Cashflows();
                        IDManager.SetID(cashflowsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        cashflowsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        cashflows = new Cashflows(item);
                    }
                }
            }


            XmlNodeList settlementProvisionNodeList = xmlNode.SelectNodes("settlementProvision");

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

            foreach (XmlNode item in settlementProvisionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementProvisionIDRef = item.Attributes["id"].Name;
                        SettlementProvision ob = SettlementProvision();
                        IDManager.SetID(settlementProvisionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementProvisionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementProvision = new SettlementProvision(item);
                    }
                }
            }


            XmlNodeList formulaNodeList = xmlNode.SelectNodes("formula");

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

            foreach (XmlNode item in formulaNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        formulaIDRef = item.Attributes["id"].Name;
                        Formula ob = Formula();
                        IDManager.SetID(formulaIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        formulaIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        formula = new Formula(item);
                    }
                }
            }
        }
        public InterestRateStream(XmlNode xmlNode)
            : base(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 calculationPeriodDatesNode = xmlNode.SelectSingleNode("calculationPeriodDates");

            if (calculationPeriodDatesNode != null)
            {
                if (calculationPeriodDatesNode.Attributes["href"] != null || calculationPeriodDatesNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesIDRef_ = calculationPeriodDatesNode.Attributes["id"].Value;
                        CalculationPeriodDates ob = new CalculationPeriodDates(calculationPeriodDatesNode);
                        IDManager.SetID(calculationPeriodDatesIDRef_, ob);
                    }
                    else if (calculationPeriodDatesNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesIDRef_ = calculationPeriodDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDates_ = new CalculationPeriodDates(calculationPeriodDatesNode);
                    }
                }
                else
                {
                    calculationPeriodDates_ = new CalculationPeriodDates(calculationPeriodDatesNode);
                }
            }


            XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");

            if (paymentDatesNode != null)
            {
                if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null)
                {
                    if (paymentDatesNode.Attributes["id"] != null)
                    {
                        paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                        PaymentDates ob = new PaymentDates(paymentDatesNode);
                        IDManager.SetID(paymentDatesIDRef_, ob);
                    }
                    else if (paymentDatesNode.Attributes["href"] != null)
                    {
                        paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDates_ = new PaymentDates(paymentDatesNode);
                    }
                }
                else
                {
                    paymentDates_ = new PaymentDates(paymentDatesNode);
                }
            }


            XmlNode resetDatesNode = xmlNode.SelectSingleNode("resetDates");

            if (resetDatesNode != null)
            {
                if (resetDatesNode.Attributes["href"] != null || resetDatesNode.Attributes["id"] != null)
                {
                    if (resetDatesNode.Attributes["id"] != null)
                    {
                        resetDatesIDRef_ = resetDatesNode.Attributes["id"].Value;
                        ResetDates ob = new ResetDates(resetDatesNode);
                        IDManager.SetID(resetDatesIDRef_, ob);
                    }
                    else if (resetDatesNode.Attributes["href"] != null)
                    {
                        resetDatesIDRef_ = resetDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetDates_ = new ResetDates(resetDatesNode);
                    }
                }
                else
                {
                    resetDates_ = new ResetDates(resetDatesNode);
                }
            }


            XmlNode calculationPeriodAmountNode = xmlNode.SelectSingleNode("calculationPeriodAmount");

            if (calculationPeriodAmountNode != null)
            {
                if (calculationPeriodAmountNode.Attributes["href"] != null || calculationPeriodAmountNode.Attributes["id"] != null)
                {
                    if (calculationPeriodAmountNode.Attributes["id"] != null)
                    {
                        calculationPeriodAmountIDRef_ = calculationPeriodAmountNode.Attributes["id"].Value;
                        CalculationPeriodAmount ob = new CalculationPeriodAmount(calculationPeriodAmountNode);
                        IDManager.SetID(calculationPeriodAmountIDRef_, ob);
                    }
                    else if (calculationPeriodAmountNode.Attributes["href"] != null)
                    {
                        calculationPeriodAmountIDRef_ = calculationPeriodAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodAmount_ = new CalculationPeriodAmount(calculationPeriodAmountNode);
                    }
                }
                else
                {
                    calculationPeriodAmount_ = new CalculationPeriodAmount(calculationPeriodAmountNode);
                }
            }


            XmlNode stubCalculationPeriodAmountNode = xmlNode.SelectSingleNode("stubCalculationPeriodAmount");

            if (stubCalculationPeriodAmountNode != null)
            {
                if (stubCalculationPeriodAmountNode.Attributes["href"] != null || stubCalculationPeriodAmountNode.Attributes["id"] != null)
                {
                    if (stubCalculationPeriodAmountNode.Attributes["id"] != null)
                    {
                        stubCalculationPeriodAmountIDRef_ = stubCalculationPeriodAmountNode.Attributes["id"].Value;
                        StubCalculationPeriodAmount ob = new StubCalculationPeriodAmount(stubCalculationPeriodAmountNode);
                        IDManager.SetID(stubCalculationPeriodAmountIDRef_, ob);
                    }
                    else if (stubCalculationPeriodAmountNode.Attributes["href"] != null)
                    {
                        stubCalculationPeriodAmountIDRef_ = stubCalculationPeriodAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        stubCalculationPeriodAmount_ = new StubCalculationPeriodAmount(stubCalculationPeriodAmountNode);
                    }
                }
                else
                {
                    stubCalculationPeriodAmount_ = new StubCalculationPeriodAmount(stubCalculationPeriodAmountNode);
                }
            }


            XmlNode principalExchangesNode = xmlNode.SelectSingleNode("principalExchanges");

            if (principalExchangesNode != null)
            {
                if (principalExchangesNode.Attributes["href"] != null || principalExchangesNode.Attributes["id"] != null)
                {
                    if (principalExchangesNode.Attributes["id"] != null)
                    {
                        principalExchangesIDRef_ = principalExchangesNode.Attributes["id"].Value;
                        PrincipalExchanges ob = new PrincipalExchanges(principalExchangesNode);
                        IDManager.SetID(principalExchangesIDRef_, ob);
                    }
                    else if (principalExchangesNode.Attributes["href"] != null)
                    {
                        principalExchangesIDRef_ = principalExchangesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        principalExchanges_ = new PrincipalExchanges(principalExchangesNode);
                    }
                }
                else
                {
                    principalExchanges_ = new PrincipalExchanges(principalExchangesNode);
                }
            }


            XmlNode cashflowsNode = xmlNode.SelectSingleNode("cashflows");

            if (cashflowsNode != null)
            {
                if (cashflowsNode.Attributes["href"] != null || cashflowsNode.Attributes["id"] != null)
                {
                    if (cashflowsNode.Attributes["id"] != null)
                    {
                        cashflowsIDRef_ = cashflowsNode.Attributes["id"].Value;
                        Cashflows ob = new Cashflows(cashflowsNode);
                        IDManager.SetID(cashflowsIDRef_, ob);
                    }
                    else if (cashflowsNode.Attributes["href"] != null)
                    {
                        cashflowsIDRef_ = cashflowsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        cashflows_ = new Cashflows(cashflowsNode);
                    }
                }
                else
                {
                    cashflows_ = new Cashflows(cashflowsNode);
                }
            }


            XmlNode settlementProvisionNode = xmlNode.SelectSingleNode("settlementProvision");

            if (settlementProvisionNode != null)
            {
                if (settlementProvisionNode.Attributes["href"] != null || settlementProvisionNode.Attributes["id"] != null)
                {
                    if (settlementProvisionNode.Attributes["id"] != null)
                    {
                        settlementProvisionIDRef_ = settlementProvisionNode.Attributes["id"].Value;
                        SettlementProvision ob = new SettlementProvision(settlementProvisionNode);
                        IDManager.SetID(settlementProvisionIDRef_, ob);
                    }
                    else if (settlementProvisionNode.Attributes["href"] != null)
                    {
                        settlementProvisionIDRef_ = settlementProvisionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementProvision_ = new SettlementProvision(settlementProvisionNode);
                    }
                }
                else
                {
                    settlementProvision_ = new SettlementProvision(settlementProvisionNode);
                }
            }


            XmlNode formulaNode = xmlNode.SelectSingleNode("formula");

            if (formulaNode != null)
            {
                if (formulaNode.Attributes["href"] != null || formulaNode.Attributes["id"] != null)
                {
                    if (formulaNode.Attributes["id"] != null)
                    {
                        formulaIDRef_ = formulaNode.Attributes["id"].Value;
                        Formula ob = new Formula(formulaNode);
                        IDManager.SetID(formulaIDRef_, ob);
                    }
                    else if (formulaNode.Attributes["href"] != null)
                    {
                        formulaIDRef_ = formulaNode.Attributes["href"].Value;
                    }
                    else
                    {
                        formula_ = new Formula(formulaNode);
                    }
                }
                else
                {
                    formula_ = new Formula(formulaNode);
                }
            }
        }
 public InterestRateStream(XmlNode xmlNode)
 : base(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 calculationPeriodDatesNodeList = xmlNode.SelectNodes("calculationPeriodDates");
     if (calculationPeriodDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDates ob = CalculationPeriodDates();
                 IDManager.SetID(calculationPeriodDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDates = new CalculationPeriodDates(item);
             }
         }
     }
     
 
     XmlNodeList paymentDatesNodeList = xmlNode.SelectNodes("paymentDates");
     if (paymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDatesIDRef = item.Attributes["id"].Name;
                 PaymentDates ob = PaymentDates();
                 IDManager.SetID(paymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDates = new PaymentDates(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesNodeList = xmlNode.SelectNodes("resetDates");
     if (resetDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesIDRef = item.Attributes["id"].Name;
                 ResetDates ob = ResetDates();
                 IDManager.SetID(resetDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDates = new ResetDates(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodAmountNodeList = xmlNode.SelectNodes("calculationPeriodAmount");
     if (calculationPeriodAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodAmountIDRef = item.Attributes["id"].Name;
                 CalculationPeriodAmount ob = CalculationPeriodAmount();
                 IDManager.SetID(calculationPeriodAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodAmount = new CalculationPeriodAmount(item);
             }
         }
     }
     
 
     XmlNodeList stubCalculationPeriodAmountNodeList = xmlNode.SelectNodes("stubCalculationPeriodAmount");
     if (stubCalculationPeriodAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubCalculationPeriodAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubCalculationPeriodAmountIDRef = item.Attributes["id"].Name;
                 StubCalculationPeriodAmount ob = StubCalculationPeriodAmount();
                 IDManager.SetID(stubCalculationPeriodAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubCalculationPeriodAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubCalculationPeriodAmount = new StubCalculationPeriodAmount(item);
             }
         }
     }
     
 
     XmlNodeList principalExchangesNodeList = xmlNode.SelectNodes("principalExchanges");
     if (principalExchangesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in principalExchangesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 principalExchangesIDRef = item.Attributes["id"].Name;
                 PrincipalExchanges ob = PrincipalExchanges();
                 IDManager.SetID(principalExchangesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 principalExchangesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 principalExchanges = new PrincipalExchanges(item);
             }
         }
     }
     
 
     XmlNodeList cashflowsNodeList = xmlNode.SelectNodes("cashflows");
     if (cashflowsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashflowsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashflowsIDRef = item.Attributes["id"].Name;
                 Cashflows ob = Cashflows();
                 IDManager.SetID(cashflowsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashflowsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashflows = new Cashflows(item);
             }
         }
     }
     
 
     XmlNodeList settlementProvisionNodeList = xmlNode.SelectNodes("settlementProvision");
     if (settlementProvisionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementProvisionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementProvisionIDRef = item.Attributes["id"].Name;
                 SettlementProvision ob = SettlementProvision();
                 IDManager.SetID(settlementProvisionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementProvisionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementProvision = new SettlementProvision(item);
             }
         }
     }
     
 
     XmlNodeList formulaNodeList = xmlNode.SelectNodes("formula");
     if (formulaNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in formulaNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 formulaIDRef = item.Attributes["id"].Name;
                 Formula ob = Formula();
                 IDManager.SetID(formulaIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 formulaIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 formula = new Formula(item);
             }
         }
     }
     
 
 }