public FormulaComponent(XmlNode xmlNode)
 {
     XmlNodeList componentDescriptionNodeList = xmlNode.SelectNodes("componentDescription");
     if (componentDescriptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in componentDescriptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 componentDescriptionIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(componentDescriptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 componentDescriptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 componentDescription = new XsdTypeString(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 FormulaComponent(XmlNode xmlNode)
 {
     XmlNode componentDescriptionNode = xmlNode.SelectSingleNode("componentDescription");
     
     if (componentDescriptionNode != null)
     {
         if (componentDescriptionNode.Attributes["href"] != null || componentDescriptionNode.Attributes["id"] != null) 
         {
             if (componentDescriptionNode.Attributes["id"] != null) 
             {
                 componentDescriptionIDRef_ = componentDescriptionNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(componentDescriptionNode);
                 IDManager.SetID(componentDescriptionIDRef_, ob);
             }
             else if (componentDescriptionNode.Attributes["href"] != null)
             {
                 componentDescriptionIDRef_ = componentDescriptionNode.Attributes["href"].Value;
             }
             else
             {
                 componentDescription_ = new XsdTypeString(componentDescriptionNode);
             }
         }
         else
         {
             componentDescription_ = new XsdTypeString(componentDescriptionNode);
         }
     }
     
 
     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 AdditionalPaymentAmount(XmlNode 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 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 AdditionalPaymentAmount(XmlNode 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 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 LegAmount(XmlNode xmlNode)
 {
     XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");
     if (currencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currencyIDRef = item.Attributes["id"].Name;
                 IdentifiedCurrency ob = IdentifiedCurrency();
                 IDManager.SetID(currencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency = new IdentifiedCurrency(item);
             }
         }
     }
     
 
     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 currencyReferenceNodeList = xmlNode.SelectNodes("currencyReference");
     if (currencyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currencyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currencyReferenceIDRef = item.Attributes["id"].Name;
                 IdentifiedCurrencyReference ob = IdentifiedCurrencyReference();
                 IDManager.SetID(currencyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currencyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currencyReference = new IdentifiedCurrencyReference(item);
             }
         }
     }
     
 
     XmlNodeList referenceAmountNodeList = xmlNode.SelectNodes("referenceAmount");
     if (referenceAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in referenceAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 referenceAmountIDRef = item.Attributes["id"].Name;
                 ReferenceAmount ob = ReferenceAmount();
                 IDManager.SetID(referenceAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 referenceAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 referenceAmount = new ReferenceAmount(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);
             }
         }
     }
     
 
     XmlNodeList encodedDescriptionNodeList = xmlNode.SelectNodes("encodedDescription");
     if (encodedDescriptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in encodedDescriptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 encodedDescriptionIDRef = item.Attributes["id"].Name;
                 XsdTypeBase64Binary ob = XsdTypeBase64Binary();
                 IDManager.SetID(encodedDescriptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 encodedDescriptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 encodedDescription = new XsdTypeBase64Binary(item);
             }
         }
     }
     
 
     XmlNodeList calculationDatesNodeList = xmlNode.SelectNodes("calculationDates");
     if (calculationDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationDatesIDRef = item.Attributes["id"].Name;
                 AdjustableRelativeOrPeriodicDates ob = AdjustableRelativeOrPeriodicDates();
                 IDManager.SetID(calculationDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationDates = new AdjustableRelativeOrPeriodicDates(item);
             }
         }
     }
     
 
 }
 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 LegAmount(XmlNode xmlNode)
 {
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 IdentifiedCurrency ob = new IdentifiedCurrency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new IdentifiedCurrency(currencyNode);
             }
         }
         else
         {
             currency_ = new IdentifiedCurrency(currencyNode);
         }
     }
     
 
     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 currencyReferenceNode = xmlNode.SelectSingleNode("currencyReference");
     
     if (currencyReferenceNode != null)
     {
         if (currencyReferenceNode.Attributes["href"] != null || currencyReferenceNode.Attributes["id"] != null) 
         {
             if (currencyReferenceNode.Attributes["id"] != null) 
             {
                 currencyReferenceIDRef_ = currencyReferenceNode.Attributes["id"].Value;
                 IdentifiedCurrencyReference ob = new IdentifiedCurrencyReference(currencyReferenceNode);
                 IDManager.SetID(currencyReferenceIDRef_, ob);
             }
             else if (currencyReferenceNode.Attributes["href"] != null)
             {
                 currencyReferenceIDRef_ = currencyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
             }
         }
         else
         {
             currencyReference_ = new IdentifiedCurrencyReference(currencyReferenceNode);
         }
     }
     
 
     XmlNode referenceAmountNode = xmlNode.SelectSingleNode("referenceAmount");
     
     if (referenceAmountNode != null)
     {
         if (referenceAmountNode.Attributes["href"] != null || referenceAmountNode.Attributes["id"] != null) 
         {
             if (referenceAmountNode.Attributes["id"] != null) 
             {
                 referenceAmountIDRef_ = referenceAmountNode.Attributes["id"].Value;
                 ReferenceAmount ob = new ReferenceAmount(referenceAmountNode);
                 IDManager.SetID(referenceAmountIDRef_, ob);
             }
             else if (referenceAmountNode.Attributes["href"] != null)
             {
                 referenceAmountIDRef_ = referenceAmountNode.Attributes["href"].Value;
             }
             else
             {
                 referenceAmount_ = new ReferenceAmount(referenceAmountNode);
             }
         }
         else
         {
             referenceAmount_ = new ReferenceAmount(referenceAmountNode);
         }
     }
     
 
     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);
         }
     }
     
 
     XmlNode encodedDescriptionNode = xmlNode.SelectSingleNode("encodedDescription");
     
     if (encodedDescriptionNode != null)
     {
         if (encodedDescriptionNode.Attributes["href"] != null || encodedDescriptionNode.Attributes["id"] != null) 
         {
             if (encodedDescriptionNode.Attributes["id"] != null) 
             {
                 encodedDescriptionIDRef_ = encodedDescriptionNode.Attributes["id"].Value;
                 XsdTypeBase64Binary ob = new XsdTypeBase64Binary(encodedDescriptionNode);
                 IDManager.SetID(encodedDescriptionIDRef_, ob);
             }
             else if (encodedDescriptionNode.Attributes["href"] != null)
             {
                 encodedDescriptionIDRef_ = encodedDescriptionNode.Attributes["href"].Value;
             }
             else
             {
                 encodedDescription_ = new XsdTypeBase64Binary(encodedDescriptionNode);
             }
         }
         else
         {
             encodedDescription_ = new XsdTypeBase64Binary(encodedDescriptionNode);
         }
     }
     
 
     XmlNode calculationDatesNode = xmlNode.SelectSingleNode("calculationDates");
     
     if (calculationDatesNode != null)
     {
         if (calculationDatesNode.Attributes["href"] != null || calculationDatesNode.Attributes["id"] != null) 
         {
             if (calculationDatesNode.Attributes["id"] != null) 
             {
                 calculationDatesIDRef_ = calculationDatesNode.Attributes["id"].Value;
                 AdjustableRelativeOrPeriodicDates ob = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
                 IDManager.SetID(calculationDatesIDRef_, ob);
             }
             else if (calculationDatesNode.Attributes["href"] != null)
             {
                 calculationDatesIDRef_ = calculationDatesNode.Attributes["href"].Value;
             }
             else
             {
                 calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
             }
         }
         else
         {
             calculationDates_ = new AdjustableRelativeOrPeriodicDates(calculationDatesNode);
         }
     }
     
 
 }