public RestructuringEvent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode partialExerciseAmountNode = xmlNode.SelectSingleNode("partialExerciseAmount");
     
     if (partialExerciseAmountNode != null)
     {
         if (partialExerciseAmountNode.Attributes["href"] != null || partialExerciseAmountNode.Attributes["id"] != null) 
         {
             if (partialExerciseAmountNode.Attributes["id"] != null) 
             {
                 partialExerciseAmountIDRef_ = partialExerciseAmountNode.Attributes["id"].Value;
                 Money ob = new Money(partialExerciseAmountNode);
                 IDManager.SetID(partialExerciseAmountIDRef_, ob);
             }
             else if (partialExerciseAmountNode.Attributes["href"] != null)
             {
                 partialExerciseAmountIDRef_ = partialExerciseAmountNode.Attributes["href"].Value;
             }
             else
             {
                 partialExerciseAmount_ = new Money(partialExerciseAmountNode);
             }
         }
         else
         {
             partialExerciseAmount_ = new Money(partialExerciseAmountNode);
         }
     }
     
 
 }
 public IndexChange(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode indexFactorNode = xmlNode.SelectSingleNode("indexFactor");
     
     if (indexFactorNode != null)
     {
         if (indexFactorNode.Attributes["href"] != null || indexFactorNode.Attributes["id"] != null) 
         {
             if (indexFactorNode.Attributes["id"] != null) 
             {
                 indexFactorIDRef_ = indexFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(indexFactorNode);
                 IDManager.SetID(indexFactorIDRef_, ob);
             }
             else if (indexFactorNode.Attributes["href"] != null)
             {
                 indexFactorIDRef_ = indexFactorNode.Attributes["href"].Value;
             }
             else
             {
                 indexFactor_ = new XsdTypeDecimal(indexFactorNode);
             }
         }
         else
         {
             indexFactor_ = new XsdTypeDecimal(indexFactorNode);
         }
     }
     
 
     XmlNode factoredCalculationAmountNode = xmlNode.SelectSingleNode("factoredCalculationAmount");
     
     if (factoredCalculationAmountNode != null)
     {
         if (factoredCalculationAmountNode.Attributes["href"] != null || factoredCalculationAmountNode.Attributes["id"] != null) 
         {
             if (factoredCalculationAmountNode.Attributes["id"] != null) 
             {
                 factoredCalculationAmountIDRef_ = factoredCalculationAmountNode.Attributes["id"].Value;
                 Money ob = new Money(factoredCalculationAmountNode);
                 IDManager.SetID(factoredCalculationAmountIDRef_, ob);
             }
             else if (factoredCalculationAmountNode.Attributes["href"] != null)
             {
                 factoredCalculationAmountIDRef_ = factoredCalculationAmountNode.Attributes["href"].Value;
             }
             else
             {
                 factoredCalculationAmount_ = new Money(factoredCalculationAmountNode);
             }
         }
         else
         {
             factoredCalculationAmount_ = new Money(factoredCalculationAmountNode);
         }
     }
     
 
 }
 public RestructuringEvent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList partialExerciseAmountNodeList = xmlNode.SelectNodes("partialExerciseAmount");
     if (partialExerciseAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partialExerciseAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partialExerciseAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(partialExerciseAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partialExerciseAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partialExerciseAmount = new Money(item);
             }
         }
     }
     
 
 }
 public IndexChange(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList indexFactorNodeList = xmlNode.SelectNodes("indexFactor");
     if (indexFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(indexFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList factoredCalculationAmountNodeList = xmlNode.SelectNodes("factoredCalculationAmount");
     if (factoredCalculationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in factoredCalculationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 factoredCalculationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(factoredCalculationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 factoredCalculationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 factoredCalculationAmount = new Money(item);
             }
         }
     }
     
 
 }
 public InstrumentTradeQuantity(XmlNode xmlNode)
 {
     XmlNodeList numberNodeList = xmlNode.SelectNodes("number");
     if (numberNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in numberNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 numberIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(numberIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 numberIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 number = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList nominalNodeList = xmlNode.SelectNodes("nominal");
     if (nominalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nominalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nominalIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(nominalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nominalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nominal = new Money(item);
             }
         }
     }
     
 
 }
 public InstrumentTradeQuantity(XmlNode xmlNode)
 {
     XmlNode numberNode = xmlNode.SelectSingleNode("number");
     
     if (numberNode != null)
     {
         if (numberNode.Attributes["href"] != null || numberNode.Attributes["id"] != null) 
         {
             if (numberNode.Attributes["id"] != null) 
             {
                 numberIDRef_ = numberNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(numberNode);
                 IDManager.SetID(numberIDRef_, ob);
             }
             else if (numberNode.Attributes["href"] != null)
             {
                 numberIDRef_ = numberNode.Attributes["href"].Value;
             }
             else
             {
                 number_ = new XsdTypeDecimal(numberNode);
             }
         }
         else
         {
             number_ = new XsdTypeDecimal(numberNode);
         }
     }
     
 
     XmlNode nominalNode = xmlNode.SelectSingleNode("nominal");
     
     if (nominalNode != null)
     {
         if (nominalNode.Attributes["href"] != null || nominalNode.Attributes["id"] != null) 
         {
             if (nominalNode.Attributes["id"] != null) 
             {
                 nominalIDRef_ = nominalNode.Attributes["id"].Value;
                 Money ob = new Money(nominalNode);
                 IDManager.SetID(nominalIDRef_, ob);
             }
             else if (nominalNode.Attributes["href"] != null)
             {
                 nominalIDRef_ = nominalNode.Attributes["href"].Value;
             }
             else
             {
                 nominal_ = new Money(nominalNode);
             }
         }
         else
         {
             nominal_ = new Money(nominalNode);
         }
     }
     
 
 }
 public AdjustedPaymentDates(XmlNode xmlNode)
 {
     XmlNode adjustedPaymentDateNode = xmlNode.SelectSingleNode("adjustedPaymentDate");
     
     if (adjustedPaymentDateNode != null)
     {
         if (adjustedPaymentDateNode.Attributes["href"] != null || adjustedPaymentDateNode.Attributes["id"] != null) 
         {
             if (adjustedPaymentDateNode.Attributes["id"] != null) 
             {
                 adjustedPaymentDateIDRef_ = adjustedPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedPaymentDateNode);
                 IDManager.SetID(adjustedPaymentDateIDRef_, ob);
             }
             else if (adjustedPaymentDateNode.Attributes["href"] != null)
             {
                 adjustedPaymentDateIDRef_ = adjustedPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedPaymentDate_ = new XsdTypeDate(adjustedPaymentDateNode);
             }
         }
         else
         {
             adjustedPaymentDate_ = new XsdTypeDate(adjustedPaymentDateNode);
         }
     }
     
 
     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;
                 Money ob = new Money(paymentAmountNode);
                 IDManager.SetID(paymentAmountIDRef_, ob);
             }
             else if (paymentAmountNode.Attributes["href"] != null)
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 paymentAmount_ = new Money(paymentAmountNode);
             }
         }
         else
         {
             paymentAmount_ = new Money(paymentAmountNode);
         }
     }
     
 
 }
 public AdjustedPaymentDates(XmlNode xmlNode)
 {
     XmlNodeList adjustedPaymentDateNodeList = xmlNode.SelectNodes("adjustedPaymentDate");
     if (adjustedPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedPaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedPaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     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;
                 Money ob = Money();
                 IDManager.SetID(paymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentAmount = new Money(item);
             }
         }
     }
     
 
 }
 public TermDeposit(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 startDateNode = xmlNode.SelectSingleNode("startDate");
     
     if (startDateNode != null)
     {
         if (startDateNode.Attributes["href"] != null || startDateNode.Attributes["id"] != null) 
         {
             if (startDateNode.Attributes["id"] != null) 
             {
                 startDateIDRef_ = startDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(startDateNode);
                 IDManager.SetID(startDateIDRef_, ob);
             }
             else if (startDateNode.Attributes["href"] != null)
             {
                 startDateIDRef_ = startDateNode.Attributes["href"].Value;
             }
             else
             {
                 startDate_ = new XsdTypeDate(startDateNode);
             }
         }
         else
         {
             startDate_ = new XsdTypeDate(startDateNode);
         }
     }
     
 
     XmlNode maturityDateNode = xmlNode.SelectSingleNode("maturityDate");
     
     if (maturityDateNode != null)
     {
         if (maturityDateNode.Attributes["href"] != null || maturityDateNode.Attributes["id"] != null) 
         {
             if (maturityDateNode.Attributes["id"] != null) 
             {
                 maturityDateIDRef_ = maturityDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(maturityDateNode);
                 IDManager.SetID(maturityDateIDRef_, ob);
             }
             else if (maturityDateNode.Attributes["href"] != null)
             {
                 maturityDateIDRef_ = maturityDateNode.Attributes["href"].Value;
             }
             else
             {
                 maturityDate_ = new XsdTypeDate(maturityDateNode);
             }
         }
         else
         {
             maturityDate_ = new XsdTypeDate(maturityDateNode);
         }
     }
     
 
     XmlNode tenorNameNode = xmlNode.SelectSingleNode("tenorName");
     
     if (tenorNameNode != null)
     {
         if (tenorNameNode.Attributes["href"] != null || tenorNameNode.Attributes["id"] != null) 
         {
             if (tenorNameNode.Attributes["id"] != null) 
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(tenorNameNode);
                 IDManager.SetID(tenorNameIDRef_, ob);
             }
             else if (tenorNameNode.Attributes["href"] != null)
             {
                 tenorNameIDRef_ = tenorNameNode.Attributes["href"].Value;
             }
             else
             {
                 tenorName_ = new XsdTypeBoolean(tenorNameNode);
             }
         }
         else
         {
             tenorName_ = new XsdTypeBoolean(tenorNameNode);
         }
     }
     
 
     XmlNode tenorPeriodNode = xmlNode.SelectSingleNode("tenorPeriod");
     
     if (tenorPeriodNode != null)
     {
         if (tenorPeriodNode.Attributes["href"] != null || tenorPeriodNode.Attributes["id"] != null) 
         {
             if (tenorPeriodNode.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["id"].Value;
                 Period ob = new Period(tenorPeriodNode);
                 IDManager.SetID(tenorPeriodIDRef_, ob);
             }
             else if (tenorPeriodNode.Attributes["href"] != null)
             {
                 tenorPeriodIDRef_ = tenorPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 tenorPeriod_ = new Period(tenorPeriodNode);
             }
         }
         else
         {
             tenorPeriod_ = new Period(tenorPeriodNode);
         }
     }
     
 
     XmlNode principalNode = xmlNode.SelectSingleNode("principal");
     
     if (principalNode != null)
     {
         if (principalNode.Attributes["href"] != null || principalNode.Attributes["id"] != null) 
         {
             if (principalNode.Attributes["id"] != null) 
             {
                 principalIDRef_ = principalNode.Attributes["id"].Value;
                 PositiveMoney ob = new PositiveMoney(principalNode);
                 IDManager.SetID(principalIDRef_, ob);
             }
             else if (principalNode.Attributes["href"] != null)
             {
                 principalIDRef_ = principalNode.Attributes["href"].Value;
             }
             else
             {
                 principal_ = new PositiveMoney(principalNode);
             }
         }
         else
         {
             principal_ = new PositiveMoney(principalNode);
         }
     }
     
 
     XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate");
     
     if (fixedRateNode != null)
     {
         if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) 
         {
             if (fixedRateNode.Attributes["id"] != null) 
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(fixedRateNode);
                 IDManager.SetID(fixedRateIDRef_, ob);
             }
             else if (fixedRateNode.Attributes["href"] != null)
             {
                 fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value;
             }
             else
             {
                 fixedRate_ = new PositiveDecimal(fixedRateNode);
             }
         }
         else
         {
             fixedRate_ = new PositiveDecimal(fixedRateNode);
         }
     }
     
 
     XmlNode dayCountFractionNode = xmlNode.SelectSingleNode("dayCountFraction");
     
     if (dayCountFractionNode != null)
     {
         if (dayCountFractionNode.Attributes["href"] != null || dayCountFractionNode.Attributes["id"] != null) 
         {
             if (dayCountFractionNode.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["id"].Value;
                 DayCountFraction ob = new DayCountFraction(dayCountFractionNode);
                 IDManager.SetID(dayCountFractionIDRef_, ob);
             }
             else if (dayCountFractionNode.Attributes["href"] != null)
             {
                 dayCountFractionIDRef_ = dayCountFractionNode.Attributes["href"].Value;
             }
             else
             {
                 dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
             }
         }
         else
         {
             dayCountFraction_ = new DayCountFraction(dayCountFractionNode);
         }
     }
     
 
     XmlNode featuresNode = xmlNode.SelectSingleNode("features");
     
     if (featuresNode != null)
     {
         if (featuresNode.Attributes["href"] != null || featuresNode.Attributes["id"] != null) 
         {
             if (featuresNode.Attributes["id"] != null) 
             {
                 featuresIDRef_ = featuresNode.Attributes["id"].Value;
                 TermDepositFeatures ob = new TermDepositFeatures(featuresNode);
                 IDManager.SetID(featuresIDRef_, ob);
             }
             else if (featuresNode.Attributes["href"] != null)
             {
                 featuresIDRef_ = featuresNode.Attributes["href"].Value;
             }
             else
             {
                 features_ = new TermDepositFeatures(featuresNode);
             }
         }
         else
         {
             features_ = new TermDepositFeatures(featuresNode);
         }
     }
     
 
     XmlNode interestNode = xmlNode.SelectSingleNode("interest");
     
     if (interestNode != null)
     {
         if (interestNode.Attributes["href"] != null || interestNode.Attributes["id"] != null) 
         {
             if (interestNode.Attributes["id"] != null) 
             {
                 interestIDRef_ = interestNode.Attributes["id"].Value;
                 Money ob = new Money(interestNode);
                 IDManager.SetID(interestIDRef_, ob);
             }
             else if (interestNode.Attributes["href"] != null)
             {
                 interestIDRef_ = interestNode.Attributes["href"].Value;
             }
             else
             {
                 interest_ = new Money(interestNode);
             }
         }
         else
         {
             interest_ = new Money(interestNode);
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     
     if (paymentNodeList != null)
     {
         this.payment_ = new List<Payment>();
         foreach (XmlNode item in paymentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     paymentIDRef_ = item.Attributes["id"].Value;
                     payment_.Add(new Payment(item));
                     IDManager.SetID(paymentIDRef_, payment_[payment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     paymentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 payment_.Add(new Payment(item));
                 }
             }
             else
             {
                 payment_.Add(new Payment(item));
             }
         }
     }
     
 
 }
 public FailureToPay(XmlNode xmlNode)
 {
     XmlNodeList applicableNodeList = xmlNode.SelectNodes("applicable");
     if (applicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in applicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 applicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(applicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 applicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 applicable = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList gracePeriodExtensionNodeList = xmlNode.SelectNodes("gracePeriodExtension");
     if (gracePeriodExtensionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in gracePeriodExtensionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 gracePeriodExtensionIDRef = item.Attributes["id"].Name;
                 GracePeriodExtension ob = GracePeriodExtension();
                 IDManager.SetID(gracePeriodExtensionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 gracePeriodExtensionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 gracePeriodExtension = new GracePeriodExtension(item);
             }
         }
     }
     
 
     XmlNodeList paymentRequirementNodeList = xmlNode.SelectNodes("paymentRequirement");
     if (paymentRequirementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentRequirementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentRequirementIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(paymentRequirementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentRequirementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentRequirement = new Money(item);
             }
         }
     }
     
 
 }
 public CalculationPeriod(XmlNode xmlNode)
 {
     XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate");
     if (unadjustedStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedStartDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(unadjustedStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedStartDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate");
     if (unadjustedEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(unadjustedEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedStartDateNodeList = xmlNode.SelectNodes("adjustedStartDate");
     if (adjustedStartDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedStartDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedStartDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedEndDateNodeList = xmlNode.SelectNodes("adjustedEndDate");
     if (adjustedEndDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedEndDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedEndDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedEndDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedEndDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedEndDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays");
     if (calculationPeriodNumberOfDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name;
                 XsdTypePositiveInteger ob = XsdTypePositiveInteger();
                 IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item);
             }
         }
     }
     
 
     XmlNodeList notionalAmountNodeList = xmlNode.SelectNodes("notionalAmount");
     if (notionalAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalAmountIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(notionalAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalAmount = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fxLinkedNotionalAmountNodeList = xmlNode.SelectNodes("fxLinkedNotionalAmount");
     if (fxLinkedNotionalAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxLinkedNotionalAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxLinkedNotionalAmountIDRef = item.Attributes["id"].Name;
                 FxLinkedNotionalAmount ob = FxLinkedNotionalAmount();
                 IDManager.SetID(fxLinkedNotionalAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxLinkedNotionalAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxLinkedNotionalAmount = new FxLinkedNotionalAmount(item);
             }
         }
     }
     
 
     XmlNodeList floatingRateDefinitionNodeList = xmlNode.SelectNodes("floatingRateDefinition");
     if (floatingRateDefinitionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingRateDefinitionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateDefinitionIDRef = item.Attributes["id"].Name;
                 FloatingRateDefinition ob = FloatingRateDefinition();
                 IDManager.SetID(floatingRateDefinitionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateDefinitionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingRateDefinition = new FloatingRateDefinition(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");
     if (fixedRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList dayCountYearFractionNodeList = xmlNode.SelectNodes("dayCountYearFraction");
     if (dayCountYearFractionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dayCountYearFractionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dayCountYearFractionIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(dayCountYearFractionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dayCountYearFractionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dayCountYearFraction = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList forecastAmountNodeList = xmlNode.SelectNodes("forecastAmount");
     if (forecastAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forecastAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forecastAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(forecastAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forecastAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forecastAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList forecastRateNodeList = xmlNode.SelectNodes("forecastRate");
     if (forecastRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forecastRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forecastRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(forecastRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forecastRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forecastRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
 }
 public PrincipalExchange(XmlNode xmlNode)
 {
     XmlNode unadjustedPrincipalExchangeDateNode = xmlNode.SelectSingleNode("unadjustedPrincipalExchangeDate");
     
     if (unadjustedPrincipalExchangeDateNode != null)
     {
         if (unadjustedPrincipalExchangeDateNode.Attributes["href"] != null || unadjustedPrincipalExchangeDateNode.Attributes["id"] != null) 
         {
             if (unadjustedPrincipalExchangeDateNode.Attributes["id"] != null) 
             {
                 unadjustedPrincipalExchangeDateIDRef_ = unadjustedPrincipalExchangeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(unadjustedPrincipalExchangeDateNode);
                 IDManager.SetID(unadjustedPrincipalExchangeDateIDRef_, ob);
             }
             else if (unadjustedPrincipalExchangeDateNode.Attributes["href"] != null)
             {
                 unadjustedPrincipalExchangeDateIDRef_ = unadjustedPrincipalExchangeDateNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedPrincipalExchangeDate_ = new XsdTypeDate(unadjustedPrincipalExchangeDateNode);
             }
         }
         else
         {
             unadjustedPrincipalExchangeDate_ = new XsdTypeDate(unadjustedPrincipalExchangeDateNode);
         }
     }
     
 
     XmlNode adjustedPrincipalExchangeDateNode = xmlNode.SelectSingleNode("adjustedPrincipalExchangeDate");
     
     if (adjustedPrincipalExchangeDateNode != null)
     {
         if (adjustedPrincipalExchangeDateNode.Attributes["href"] != null || adjustedPrincipalExchangeDateNode.Attributes["id"] != null) 
         {
             if (adjustedPrincipalExchangeDateNode.Attributes["id"] != null) 
             {
                 adjustedPrincipalExchangeDateIDRef_ = adjustedPrincipalExchangeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedPrincipalExchangeDateNode);
                 IDManager.SetID(adjustedPrincipalExchangeDateIDRef_, ob);
             }
             else if (adjustedPrincipalExchangeDateNode.Attributes["href"] != null)
             {
                 adjustedPrincipalExchangeDateIDRef_ = adjustedPrincipalExchangeDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedPrincipalExchangeDate_ = new XsdTypeDate(adjustedPrincipalExchangeDateNode);
             }
         }
         else
         {
             adjustedPrincipalExchangeDate_ = new XsdTypeDate(adjustedPrincipalExchangeDateNode);
         }
     }
     
 
     XmlNode principalExchangeAmountNode = xmlNode.SelectSingleNode("principalExchangeAmount");
     
     if (principalExchangeAmountNode != null)
     {
         if (principalExchangeAmountNode.Attributes["href"] != null || principalExchangeAmountNode.Attributes["id"] != null) 
         {
             if (principalExchangeAmountNode.Attributes["id"] != null) 
             {
                 principalExchangeAmountIDRef_ = principalExchangeAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(principalExchangeAmountNode);
                 IDManager.SetID(principalExchangeAmountIDRef_, ob);
             }
             else if (principalExchangeAmountNode.Attributes["href"] != null)
             {
                 principalExchangeAmountIDRef_ = principalExchangeAmountNode.Attributes["href"].Value;
             }
             else
             {
                 principalExchangeAmount_ = new XsdTypeDecimal(principalExchangeAmountNode);
             }
         }
         else
         {
             principalExchangeAmount_ = new XsdTypeDecimal(principalExchangeAmountNode);
         }
     }
     
 
     XmlNode discountFactorNode = xmlNode.SelectSingleNode("discountFactor");
     
     if (discountFactorNode != null)
     {
         if (discountFactorNode.Attributes["href"] != null || discountFactorNode.Attributes["id"] != null) 
         {
             if (discountFactorNode.Attributes["id"] != null) 
             {
                 discountFactorIDRef_ = discountFactorNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(discountFactorNode);
                 IDManager.SetID(discountFactorIDRef_, ob);
             }
             else if (discountFactorNode.Attributes["href"] != null)
             {
                 discountFactorIDRef_ = discountFactorNode.Attributes["href"].Value;
             }
             else
             {
                 discountFactor_ = new XsdTypeDecimal(discountFactorNode);
             }
         }
         else
         {
             discountFactor_ = new XsdTypeDecimal(discountFactorNode);
         }
     }
     
 
     XmlNode presentValuePrincipalExchangeAmountNode = xmlNode.SelectSingleNode("presentValuePrincipalExchangeAmount");
     
     if (presentValuePrincipalExchangeAmountNode != null)
     {
         if (presentValuePrincipalExchangeAmountNode.Attributes["href"] != null || presentValuePrincipalExchangeAmountNode.Attributes["id"] != null) 
         {
             if (presentValuePrincipalExchangeAmountNode.Attributes["id"] != null) 
             {
                 presentValuePrincipalExchangeAmountIDRef_ = presentValuePrincipalExchangeAmountNode.Attributes["id"].Value;
                 Money ob = new Money(presentValuePrincipalExchangeAmountNode);
                 IDManager.SetID(presentValuePrincipalExchangeAmountIDRef_, ob);
             }
             else if (presentValuePrincipalExchangeAmountNode.Attributes["href"] != null)
             {
                 presentValuePrincipalExchangeAmountIDRef_ = presentValuePrincipalExchangeAmountNode.Attributes["href"].Value;
             }
             else
             {
                 presentValuePrincipalExchangeAmount_ = new Money(presentValuePrincipalExchangeAmountNode);
             }
         }
         else
         {
             presentValuePrincipalExchangeAmount_ = new Money(presentValuePrincipalExchangeAmountNode);
         }
     }
     
 
 }
 public SplitSettlement(XmlNode xmlNode)
 {
     XmlNode splitSettlementAmountNode = xmlNode.SelectSingleNode("splitSettlementAmount");
     
     if (splitSettlementAmountNode != null)
     {
         if (splitSettlementAmountNode.Attributes["href"] != null || splitSettlementAmountNode.Attributes["id"] != null) 
         {
             if (splitSettlementAmountNode.Attributes["id"] != null) 
             {
                 splitSettlementAmountIDRef_ = splitSettlementAmountNode.Attributes["id"].Value;
                 Money ob = new Money(splitSettlementAmountNode);
                 IDManager.SetID(splitSettlementAmountIDRef_, ob);
             }
             else if (splitSettlementAmountNode.Attributes["href"] != null)
             {
                 splitSettlementAmountIDRef_ = splitSettlementAmountNode.Attributes["href"].Value;
             }
             else
             {
                 splitSettlementAmount_ = new Money(splitSettlementAmountNode);
             }
         }
         else
         {
             splitSettlementAmount_ = new Money(splitSettlementAmountNode);
         }
     }
     
 
     XmlNode beneficiaryBankNode = xmlNode.SelectSingleNode("beneficiaryBank");
     
     if (beneficiaryBankNode != null)
     {
         if (beneficiaryBankNode.Attributes["href"] != null || beneficiaryBankNode.Attributes["id"] != null) 
         {
             if (beneficiaryBankNode.Attributes["id"] != null) 
             {
                 beneficiaryBankIDRef_ = beneficiaryBankNode.Attributes["id"].Value;
                 Routing ob = new Routing(beneficiaryBankNode);
                 IDManager.SetID(beneficiaryBankIDRef_, ob);
             }
             else if (beneficiaryBankNode.Attributes["href"] != null)
             {
                 beneficiaryBankIDRef_ = beneficiaryBankNode.Attributes["href"].Value;
             }
             else
             {
                 beneficiaryBank_ = new Routing(beneficiaryBankNode);
             }
         }
         else
         {
             beneficiaryBank_ = new Routing(beneficiaryBankNode);
         }
     }
     
 
     XmlNode beneficiaryNode = xmlNode.SelectSingleNode("beneficiary");
     
     if (beneficiaryNode != null)
     {
         if (beneficiaryNode.Attributes["href"] != null || beneficiaryNode.Attributes["id"] != null) 
         {
             if (beneficiaryNode.Attributes["id"] != null) 
             {
                 beneficiaryIDRef_ = beneficiaryNode.Attributes["id"].Value;
                 Routing ob = new Routing(beneficiaryNode);
                 IDManager.SetID(beneficiaryIDRef_, ob);
             }
             else if (beneficiaryNode.Attributes["href"] != null)
             {
                 beneficiaryIDRef_ = beneficiaryNode.Attributes["href"].Value;
             }
             else
             {
                 beneficiary_ = new Routing(beneficiaryNode);
             }
         }
         else
         {
             beneficiary_ = new Routing(beneficiaryNode);
         }
     }
     
 
 }
 public CashSettlementTerms(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList valuationDateNodeList = xmlNode.SelectNodes("valuationDate");
     if (valuationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationDateIDRef = item.Attributes["id"].Name;
                 ValuationDate ob = ValuationDate();
                 IDManager.SetID(valuationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationDate = new ValuationDate(item);
             }
         }
     }
     
 
     XmlNodeList valuationTimeNodeList = xmlNode.SelectNodes("valuationTime");
     if (valuationTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationTimeIDRef = item.Attributes["id"].Name;
                 BusinessCenterTime ob = BusinessCenterTime();
                 IDManager.SetID(valuationTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationTime = new BusinessCenterTime(item);
             }
         }
     }
     
 
     XmlNodeList quotationMethodNodeList = xmlNode.SelectNodes("quotationMethod");
     if (quotationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotationMethodIDRef = item.Attributes["id"].Name;
                 QuotationRateTypeEnum ob = QuotationRateTypeEnum();
                 IDManager.SetID(quotationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotationMethod = new QuotationRateTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList quotationAmountNodeList = xmlNode.SelectNodes("quotationAmount");
     if (quotationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quotationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quotationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(quotationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quotationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quotationAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList minimumQuotationAmountNodeList = xmlNode.SelectNodes("minimumQuotationAmount");
     if (minimumQuotationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in minimumQuotationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 minimumQuotationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(minimumQuotationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 minimumQuotationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 minimumQuotationAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList dealerNodeList = xmlNode.SelectNodes("dealer");
     
     foreach (XmlNode item in dealerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dealerIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = new XsdTypeString();
                 ob.Add(new XsdTypeString(item));
                 IDManager.SetID(dealerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dealerIDRef = item.Attributes["href"].Name;
             }
             else
             {
             dealer.Add(new XsdTypeString(item));
             }
         }
     }
     
 
     XmlNodeList cashSettlementBusinessDaysNodeList = xmlNode.SelectNodes("cashSettlementBusinessDays");
     if (cashSettlementBusinessDaysNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementBusinessDaysNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementBusinessDaysIDRef = item.Attributes["id"].Name;
                 XsdTypeNonNegativeInteger ob = XsdTypeNonNegativeInteger();
                 IDManager.SetID(cashSettlementBusinessDaysIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementBusinessDaysIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementBusinessDays = new XsdTypeNonNegativeInteger(item);
             }
         }
     }
     
 
     XmlNodeList cashSettlementAmountNodeList = xmlNode.SelectNodes("cashSettlementAmount");
     if (cashSettlementAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashSettlementAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashSettlementAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(cashSettlementAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashSettlementAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cashSettlementAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList recoveryFactorNodeList = xmlNode.SelectNodes("recoveryFactor");
     if (recoveryFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in recoveryFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 recoveryFactorIDRef = item.Attributes["id"].Name;
                 RestrictedPercentage ob = RestrictedPercentage();
                 IDManager.SetID(recoveryFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 recoveryFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 recoveryFactor = new RestrictedPercentage(item);
             }
         }
     }
     
 
     XmlNodeList fixedSettlementNodeList = xmlNode.SelectNodes("fixedSettlement");
     if (fixedSettlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedSettlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedSettlementIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fixedSettlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedSettlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedSettlement = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList accruedInterestNodeList = xmlNode.SelectNodes("accruedInterest");
     if (accruedInterestNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accruedInterestNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accruedInterestIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(accruedInterestIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accruedInterestIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accruedInterest = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList valuationMethodNodeList = xmlNode.SelectNodes("valuationMethod");
     if (valuationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationMethodIDRef = item.Attributes["id"].Name;
                 ValuationMethodEnum ob = ValuationMethodEnum();
                 IDManager.SetID(valuationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationMethod = new ValuationMethodEnum(item);
             }
         }
     }
     
 
 }
 public OptionExercise(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode optionSellerNode = xmlNode.SelectSingleNode("optionSeller");
     
     if (optionSellerNode != null)
     {
         if (optionSellerNode.Attributes["href"] != null || optionSellerNode.Attributes["id"] != null) 
         {
             if (optionSellerNode.Attributes["id"] != null) 
             {
                 optionSellerIDRef_ = optionSellerNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(optionSellerNode);
                 IDManager.SetID(optionSellerIDRef_, ob);
             }
             else if (optionSellerNode.Attributes["href"] != null)
             {
                 optionSellerIDRef_ = optionSellerNode.Attributes["href"].Value;
             }
             else
             {
                 optionSeller_ = new PartyReference(optionSellerNode);
             }
         }
         else
         {
             optionSeller_ = new PartyReference(optionSellerNode);
         }
     }
     
 
     XmlNode optionBuyerNode = xmlNode.SelectSingleNode("optionBuyer");
     
     if (optionBuyerNode != null)
     {
         if (optionBuyerNode.Attributes["href"] != null || optionBuyerNode.Attributes["id"] != null) 
         {
             if (optionBuyerNode.Attributes["id"] != null) 
             {
                 optionBuyerIDRef_ = optionBuyerNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(optionBuyerNode);
                 IDManager.SetID(optionBuyerIDRef_, ob);
             }
             else if (optionBuyerNode.Attributes["href"] != null)
             {
                 optionBuyerIDRef_ = optionBuyerNode.Attributes["href"].Value;
             }
             else
             {
                 optionBuyer_ = new PartyReference(optionBuyerNode);
             }
         }
         else
         {
             optionBuyer_ = new PartyReference(optionBuyerNode);
         }
     }
     
 
     XmlNode originalTradeNode = xmlNode.SelectSingleNode("originalTrade");
     
     if (originalTradeNode != null)
     {
         if (originalTradeNode.Attributes["href"] != null || originalTradeNode.Attributes["id"] != null) 
         {
             if (originalTradeNode.Attributes["id"] != null) 
             {
                 originalTradeIDRef_ = originalTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(originalTradeNode);
                 IDManager.SetID(originalTradeIDRef_, ob);
             }
             else if (originalTradeNode.Attributes["href"] != null)
             {
                 originalTradeIDRef_ = originalTradeNode.Attributes["href"].Value;
             }
             else
             {
                 originalTrade_ = new Trade(originalTradeNode);
             }
         }
         else
         {
             originalTrade_ = new Trade(originalTradeNode);
         }
     }
     
 
     XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");
     
     if (tradeIdentifierNodeList != null)
     {
         this.tradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in tradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     tradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     tradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 tradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode exerciseDateNode = xmlNode.SelectSingleNode("exerciseDate");
     
     if (exerciseDateNode != null)
     {
         if (exerciseDateNode.Attributes["href"] != null || exerciseDateNode.Attributes["id"] != null) 
         {
             if (exerciseDateNode.Attributes["id"] != null) 
             {
                 exerciseDateIDRef_ = exerciseDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(exerciseDateNode);
                 IDManager.SetID(exerciseDateIDRef_, ob);
             }
             else if (exerciseDateNode.Attributes["href"] != null)
             {
                 exerciseDateIDRef_ = exerciseDateNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseDate_ = new XsdTypeDate(exerciseDateNode);
             }
         }
         else
         {
             exerciseDate_ = new XsdTypeDate(exerciseDateNode);
         }
     }
     
 
     XmlNode exerciseTimeNode = xmlNode.SelectSingleNode("exerciseTime");
     
     if (exerciseTimeNode != null)
     {
         if (exerciseTimeNode.Attributes["href"] != null || exerciseTimeNode.Attributes["id"] != null) 
         {
             if (exerciseTimeNode.Attributes["id"] != null) 
             {
                 exerciseTimeIDRef_ = exerciseTimeNode.Attributes["id"].Value;
                 XsdTypeTime ob = new XsdTypeTime(exerciseTimeNode);
                 IDManager.SetID(exerciseTimeIDRef_, ob);
             }
             else if (exerciseTimeNode.Attributes["href"] != null)
             {
                 exerciseTimeIDRef_ = exerciseTimeNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseTime_ = new XsdTypeTime(exerciseTimeNode);
             }
         }
         else
         {
             exerciseTime_ = new XsdTypeTime(exerciseTimeNode);
         }
     }
     
 
     XmlNode expiryNode = xmlNode.SelectSingleNode("expiry");
     
     if (expiryNode != null)
     {
         if (expiryNode.Attributes["href"] != null || expiryNode.Attributes["id"] != null) 
         {
             if (expiryNode.Attributes["id"] != null) 
             {
                 expiryIDRef_ = expiryNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(expiryNode);
                 IDManager.SetID(expiryIDRef_, ob);
             }
             else if (expiryNode.Attributes["href"] != null)
             {
                 expiryIDRef_ = expiryNode.Attributes["href"].Value;
             }
             else
             {
                 expiry_ = new XsdTypeBoolean(expiryNode);
             }
         }
         else
         {
             expiry_ = new XsdTypeBoolean(expiryNode);
         }
     }
     
 
     XmlNode fullExerciseNode = xmlNode.SelectSingleNode("fullExercise");
     
     if (fullExerciseNode != null)
     {
         if (fullExerciseNode.Attributes["href"] != null || fullExerciseNode.Attributes["id"] != null) 
         {
             if (fullExerciseNode.Attributes["id"] != null) 
             {
                 fullExerciseIDRef_ = fullExerciseNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fullExerciseNode);
                 IDManager.SetID(fullExerciseIDRef_, ob);
             }
             else if (fullExerciseNode.Attributes["href"] != null)
             {
                 fullExerciseIDRef_ = fullExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 fullExercise_ = new XsdTypeBoolean(fullExerciseNode);
             }
         }
         else
         {
             fullExercise_ = new XsdTypeBoolean(fullExerciseNode);
         }
     }
     
 
     XmlNode exerciseInNotionalAmountNode = xmlNode.SelectSingleNode("exerciseInNotionalAmount");
     
     if (exerciseInNotionalAmountNode != null)
     {
         if (exerciseInNotionalAmountNode.Attributes["href"] != null || exerciseInNotionalAmountNode.Attributes["id"] != null) 
         {
             if (exerciseInNotionalAmountNode.Attributes["id"] != null) 
             {
                 exerciseInNotionalAmountIDRef_ = exerciseInNotionalAmountNode.Attributes["id"].Value;
                 Money ob = new Money(exerciseInNotionalAmountNode);
                 IDManager.SetID(exerciseInNotionalAmountIDRef_, ob);
             }
             else if (exerciseInNotionalAmountNode.Attributes["href"] != null)
             {
                 exerciseInNotionalAmountIDRef_ = exerciseInNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseInNotionalAmount_ = new Money(exerciseInNotionalAmountNode);
             }
         }
         else
         {
             exerciseInNotionalAmount_ = new Money(exerciseInNotionalAmountNode);
         }
     }
     
 
     XmlNode outstandingNotionalAmountNode = xmlNode.SelectSingleNode("outstandingNotionalAmount");
     
     if (outstandingNotionalAmountNode != null)
     {
         if (outstandingNotionalAmountNode.Attributes["href"] != null || outstandingNotionalAmountNode.Attributes["id"] != null) 
         {
             if (outstandingNotionalAmountNode.Attributes["id"] != null) 
             {
                 outstandingNotionalAmountIDRef_ = outstandingNotionalAmountNode.Attributes["id"].Value;
                 Money ob = new Money(outstandingNotionalAmountNode);
                 IDManager.SetID(outstandingNotionalAmountIDRef_, ob);
             }
             else if (outstandingNotionalAmountNode.Attributes["href"] != null)
             {
                 outstandingNotionalAmountIDRef_ = outstandingNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 outstandingNotionalAmount_ = new Money(outstandingNotionalAmountNode);
             }
         }
         else
         {
             outstandingNotionalAmount_ = new Money(outstandingNotionalAmountNode);
         }
     }
     
 
     XmlNode exerciseInNumberOfOptionsNode = xmlNode.SelectSingleNode("exerciseInNumberOfOptions");
     
     if (exerciseInNumberOfOptionsNode != null)
     {
         if (exerciseInNumberOfOptionsNode.Attributes["href"] != null || exerciseInNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (exerciseInNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 exerciseInNumberOfOptionsIDRef_ = exerciseInNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(exerciseInNumberOfOptionsNode);
                 IDManager.SetID(exerciseInNumberOfOptionsIDRef_, ob);
             }
             else if (exerciseInNumberOfOptionsNode.Attributes["href"] != null)
             {
                 exerciseInNumberOfOptionsIDRef_ = exerciseInNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseInNumberOfOptions_ = new XsdTypeDecimal(exerciseInNumberOfOptionsNode);
             }
         }
         else
         {
             exerciseInNumberOfOptions_ = new XsdTypeDecimal(exerciseInNumberOfOptionsNode);
         }
     }
     
 
     XmlNode outstandingNumberOfOptionsNode = xmlNode.SelectSingleNode("outstandingNumberOfOptions");
     
     if (outstandingNumberOfOptionsNode != null)
     {
         if (outstandingNumberOfOptionsNode.Attributes["href"] != null || outstandingNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (outstandingNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 outstandingNumberOfOptionsIDRef_ = outstandingNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(outstandingNumberOfOptionsNode);
                 IDManager.SetID(outstandingNumberOfOptionsIDRef_, ob);
             }
             else if (outstandingNumberOfOptionsNode.Attributes["href"] != null)
             {
                 outstandingNumberOfOptionsIDRef_ = outstandingNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 outstandingNumberOfOptions_ = new XsdTypeDecimal(outstandingNumberOfOptionsNode);
             }
         }
         else
         {
             outstandingNumberOfOptions_ = new XsdTypeDecimal(outstandingNumberOfOptionsNode);
         }
     }
     
 
     XmlNode exerciseInNumberOfUnitsNode = xmlNode.SelectSingleNode("exerciseInNumberOfUnits");
     
     if (exerciseInNumberOfUnitsNode != null)
     {
         if (exerciseInNumberOfUnitsNode.Attributes["href"] != null || exerciseInNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (exerciseInNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 exerciseInNumberOfUnitsIDRef_ = exerciseInNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(exerciseInNumberOfUnitsNode);
                 IDManager.SetID(exerciseInNumberOfUnitsIDRef_, ob);
             }
             else if (exerciseInNumberOfUnitsNode.Attributes["href"] != null)
             {
                 exerciseInNumberOfUnitsIDRef_ = exerciseInNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseInNumberOfUnits_ = new XsdTypeDecimal(exerciseInNumberOfUnitsNode);
             }
         }
         else
         {
             exerciseInNumberOfUnits_ = new XsdTypeDecimal(exerciseInNumberOfUnitsNode);
         }
     }
     
 
     XmlNode outstandingNumberOfUnitsNode = xmlNode.SelectSingleNode("outstandingNumberOfUnits");
     
     if (outstandingNumberOfUnitsNode != null)
     {
         if (outstandingNumberOfUnitsNode.Attributes["href"] != null || outstandingNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (outstandingNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 outstandingNumberOfUnitsIDRef_ = outstandingNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(outstandingNumberOfUnitsNode);
                 IDManager.SetID(outstandingNumberOfUnitsIDRef_, ob);
             }
             else if (outstandingNumberOfUnitsNode.Attributes["href"] != null)
             {
                 outstandingNumberOfUnitsIDRef_ = outstandingNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 outstandingNumberOfUnits_ = new XsdTypeDecimal(outstandingNumberOfUnitsNode);
             }
         }
         else
         {
             outstandingNumberOfUnits_ = new XsdTypeDecimal(outstandingNumberOfUnitsNode);
         }
     }
     
 
     XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType");
     
     if (settlementTypeNode != null)
     {
         if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null) 
         {
             if (settlementTypeNode.Attributes["id"] != null) 
             {
                 settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value;
                 SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode);
                 IDManager.SetID(settlementTypeIDRef_, ob);
             }
             else if (settlementTypeNode.Attributes["href"] != null)
             {
                 settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value;
             }
             else
             {
                 settlementType_ = new SettlementTypeEnum(settlementTypeNode);
             }
         }
         else
         {
             settlementType_ = new SettlementTypeEnum(settlementTypeNode);
         }
     }
     
 
     XmlNode cashSettlementNode = xmlNode.SelectSingleNode("cashSettlement");
     
     if (cashSettlementNode != null)
     {
         if (cashSettlementNode.Attributes["href"] != null || cashSettlementNode.Attributes["id"] != null) 
         {
             if (cashSettlementNode.Attributes["id"] != null) 
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["id"].Value;
                 SimplePayment ob = new SimplePayment(cashSettlementNode);
                 IDManager.SetID(cashSettlementIDRef_, ob);
             }
             else if (cashSettlementNode.Attributes["href"] != null)
             {
                 cashSettlementIDRef_ = cashSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 cashSettlement_ = new SimplePayment(cashSettlementNode);
             }
         }
         else
         {
             cashSettlement_ = new SimplePayment(cashSettlementNode);
         }
     }
     
 
     XmlNode physicalSettlementNode = xmlNode.SelectSingleNode("physicalSettlement");
     
     if (physicalSettlementNode != null)
     {
         if (physicalSettlementNode.Attributes["href"] != null || physicalSettlementNode.Attributes["id"] != null) 
         {
             if (physicalSettlementNode.Attributes["id"] != null) 
             {
                 physicalSettlementIDRef_ = physicalSettlementNode.Attributes["id"].Value;
                 PhysicalSettlement ob = new PhysicalSettlement(physicalSettlementNode);
                 IDManager.SetID(physicalSettlementIDRef_, ob);
             }
             else if (physicalSettlementNode.Attributes["href"] != null)
             {
                 physicalSettlementIDRef_ = physicalSettlementNode.Attributes["href"].Value;
             }
             else
             {
                 physicalSettlement_ = new PhysicalSettlement(physicalSettlementNode);
             }
         }
         else
         {
             physicalSettlement_ = new PhysicalSettlement(physicalSettlementNode);
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 NonNegativePayment ob = new NonNegativePayment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new NonNegativePayment(paymentNode);
             }
         }
         else
         {
             payment_ = new NonNegativePayment(paymentNode);
         }
     }
     
 
 }
 public PrincipalExchange(XmlNode xmlNode)
 {
     XmlNodeList unadjustedPrincipalExchangeDateNodeList = xmlNode.SelectNodes("unadjustedPrincipalExchangeDate");
     if (unadjustedPrincipalExchangeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedPrincipalExchangeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedPrincipalExchangeDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(unadjustedPrincipalExchangeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedPrincipalExchangeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedPrincipalExchangeDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedPrincipalExchangeDateNodeList = xmlNode.SelectNodes("adjustedPrincipalExchangeDate");
     if (adjustedPrincipalExchangeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedPrincipalExchangeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedPrincipalExchangeDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedPrincipalExchangeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedPrincipalExchangeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedPrincipalExchangeDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList principalExchangeAmountNodeList = xmlNode.SelectNodes("principalExchangeAmount");
     if (principalExchangeAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in principalExchangeAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 principalExchangeAmountIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(principalExchangeAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 principalExchangeAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 principalExchangeAmount = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList discountFactorNodeList = xmlNode.SelectNodes("discountFactor");
     if (discountFactorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in discountFactorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 discountFactorIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(discountFactorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 discountFactorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 discountFactor = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList presentValuePrincipalExchangeAmountNodeList = xmlNode.SelectNodes("presentValuePrincipalExchangeAmount");
     if (presentValuePrincipalExchangeAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in presentValuePrincipalExchangeAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 presentValuePrincipalExchangeAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(presentValuePrincipalExchangeAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 presentValuePrincipalExchangeAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 presentValuePrincipalExchangeAmount = new Money(item);
             }
         }
     }
     
 
 }
 public SinglePayment(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode adjustablePaymentDateNode = xmlNode.SelectSingleNode("adjustablePaymentDate");
     
     if (adjustablePaymentDateNode != null)
     {
         if (adjustablePaymentDateNode.Attributes["href"] != null || adjustablePaymentDateNode.Attributes["id"] != null) 
         {
             if (adjustablePaymentDateNode.Attributes["id"] != null) 
             {
                 adjustablePaymentDateIDRef_ = adjustablePaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustablePaymentDateNode);
                 IDManager.SetID(adjustablePaymentDateIDRef_, ob);
             }
             else if (adjustablePaymentDateNode.Attributes["href"] != null)
             {
                 adjustablePaymentDateIDRef_ = adjustablePaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustablePaymentDate_ = new XsdTypeDate(adjustablePaymentDateNode);
             }
         }
         else
         {
             adjustablePaymentDate_ = new XsdTypeDate(adjustablePaymentDateNode);
         }
     }
     
 
     XmlNode adjustedPaymentDateNode = xmlNode.SelectSingleNode("adjustedPaymentDate");
     
     if (adjustedPaymentDateNode != null)
     {
         if (adjustedPaymentDateNode.Attributes["href"] != null || adjustedPaymentDateNode.Attributes["id"] != null) 
         {
             if (adjustedPaymentDateNode.Attributes["id"] != null) 
             {
                 adjustedPaymentDateIDRef_ = adjustedPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedPaymentDateNode);
                 IDManager.SetID(adjustedPaymentDateIDRef_, ob);
             }
             else if (adjustedPaymentDateNode.Attributes["href"] != null)
             {
                 adjustedPaymentDateIDRef_ = adjustedPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedPaymentDate_ = new XsdTypeDate(adjustedPaymentDateNode);
             }
         }
         else
         {
             adjustedPaymentDate_ = new XsdTypeDate(adjustedPaymentDateNode);
         }
     }
     
 
     XmlNode fixedAmountNode = xmlNode.SelectSingleNode("fixedAmount");
     
     if (fixedAmountNode != null)
     {
         if (fixedAmountNode.Attributes["href"] != null || fixedAmountNode.Attributes["id"] != null) 
         {
             if (fixedAmountNode.Attributes["id"] != null) 
             {
                 fixedAmountIDRef_ = fixedAmountNode.Attributes["id"].Value;
                 Money ob = new Money(fixedAmountNode);
                 IDManager.SetID(fixedAmountIDRef_, ob);
             }
             else if (fixedAmountNode.Attributes["href"] != null)
             {
                 fixedAmountIDRef_ = fixedAmountNode.Attributes["href"].Value;
             }
             else
             {
                 fixedAmount_ = new Money(fixedAmountNode);
             }
         }
         else
         {
             fixedAmount_ = new Money(fixedAmountNode);
         }
     }
     
 
 }
 public TermDeposit(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 startDateNodeList = xmlNode.SelectNodes("startDate");
     if (startDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in startDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 startDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(startDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 startDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 startDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList maturityDateNodeList = xmlNode.SelectNodes("maturityDate");
     if (maturityDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in maturityDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 maturityDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(maturityDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 maturityDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 maturityDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList tenorNameNodeList = xmlNode.SelectNodes("tenorName");
     if (tenorNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tenorNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tenorNameIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(tenorNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tenorNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tenorName = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList tenorPeriodNodeList = xmlNode.SelectNodes("tenorPeriod");
     if (tenorPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tenorPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tenorPeriodIDRef = item.Attributes["id"].Name;
                 Period ob = Period();
                 IDManager.SetID(tenorPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tenorPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tenorPeriod = new Period(item);
             }
         }
     }
     
 
     XmlNodeList principalNodeList = xmlNode.SelectNodes("principal");
     if (principalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in principalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 principalIDRef = item.Attributes["id"].Name;
                 PositiveMoney ob = PositiveMoney();
                 IDManager.SetID(principalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 principalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 principal = new PositiveMoney(item);
             }
         }
     }
     
 
     XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate");
     if (fixedRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixedRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixedRateIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(fixedRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixedRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixedRate = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList dayCountFractionNodeList = xmlNode.SelectNodes("dayCountFraction");
     if (dayCountFractionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dayCountFractionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dayCountFractionIDRef = item.Attributes["id"].Name;
                 DayCountFraction ob = DayCountFraction();
                 IDManager.SetID(dayCountFractionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dayCountFractionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dayCountFraction = new DayCountFraction(item);
             }
         }
     }
     
 
     XmlNodeList featuresNodeList = xmlNode.SelectNodes("features");
     if (featuresNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in featuresNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 featuresIDRef = item.Attributes["id"].Name;
                 TermDepositFeatures ob = TermDepositFeatures();
                 IDManager.SetID(featuresIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 featuresIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 features = new TermDepositFeatures(item);
             }
         }
     }
     
 
     XmlNodeList interestNodeList = xmlNode.SelectNodes("interest");
     if (interestNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(interestIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interest = new Money(item);
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 List<Payment> ob = new List<Payment>();
                 ob.Add(new Payment(item));
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
             payment.Add(new Payment(item));
             }
         }
     }
     
 
 }
 public ConstituentWeight(XmlNode xmlNode)
 {
     XmlNode openUnitsNode = xmlNode.SelectSingleNode("openUnits");
     
     if (openUnitsNode != null)
     {
         if (openUnitsNode.Attributes["href"] != null || openUnitsNode.Attributes["id"] != null) 
         {
             if (openUnitsNode.Attributes["id"] != null) 
             {
                 openUnitsIDRef_ = openUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(openUnitsNode);
                 IDManager.SetID(openUnitsIDRef_, ob);
             }
             else if (openUnitsNode.Attributes["href"] != null)
             {
                 openUnitsIDRef_ = openUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 openUnits_ = new XsdTypeDecimal(openUnitsNode);
             }
         }
         else
         {
             openUnits_ = new XsdTypeDecimal(openUnitsNode);
         }
     }
     
 
     XmlNode basketPercentageNode = xmlNode.SelectSingleNode("basketPercentage");
     
     if (basketPercentageNode != null)
     {
         if (basketPercentageNode.Attributes["href"] != null || basketPercentageNode.Attributes["id"] != null) 
         {
             if (basketPercentageNode.Attributes["id"] != null) 
             {
                 basketPercentageIDRef_ = basketPercentageNode.Attributes["id"].Value;
                 RestrictedPercentage ob = new RestrictedPercentage(basketPercentageNode);
                 IDManager.SetID(basketPercentageIDRef_, ob);
             }
             else if (basketPercentageNode.Attributes["href"] != null)
             {
                 basketPercentageIDRef_ = basketPercentageNode.Attributes["href"].Value;
             }
             else
             {
                 basketPercentage_ = new RestrictedPercentage(basketPercentageNode);
             }
         }
         else
         {
             basketPercentage_ = new RestrictedPercentage(basketPercentageNode);
         }
     }
     
 
     XmlNode basketAmountNode = xmlNode.SelectSingleNode("basketAmount");
     
     if (basketAmountNode != null)
     {
         if (basketAmountNode.Attributes["href"] != null || basketAmountNode.Attributes["id"] != null) 
         {
             if (basketAmountNode.Attributes["id"] != null) 
             {
                 basketAmountIDRef_ = basketAmountNode.Attributes["id"].Value;
                 Money ob = new Money(basketAmountNode);
                 IDManager.SetID(basketAmountIDRef_, ob);
             }
             else if (basketAmountNode.Attributes["href"] != null)
             {
                 basketAmountIDRef_ = basketAmountNode.Attributes["href"].Value;
             }
             else
             {
                 basketAmount_ = new Money(basketAmountNode);
             }
         }
         else
         {
             basketAmount_ = new Money(basketAmountNode);
         }
     }
     
 
 }
 public InitialPayment(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 adjustablePaymentDateNode = xmlNode.SelectSingleNode("adjustablePaymentDate");
     
     if (adjustablePaymentDateNode != null)
     {
         if (adjustablePaymentDateNode.Attributes["href"] != null || adjustablePaymentDateNode.Attributes["id"] != null) 
         {
             if (adjustablePaymentDateNode.Attributes["id"] != null) 
             {
                 adjustablePaymentDateIDRef_ = adjustablePaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustablePaymentDateNode);
                 IDManager.SetID(adjustablePaymentDateIDRef_, ob);
             }
             else if (adjustablePaymentDateNode.Attributes["href"] != null)
             {
                 adjustablePaymentDateIDRef_ = adjustablePaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustablePaymentDate_ = new XsdTypeDate(adjustablePaymentDateNode);
             }
         }
         else
         {
             adjustablePaymentDate_ = new XsdTypeDate(adjustablePaymentDateNode);
         }
     }
     
 
     XmlNode adjustedPaymentDateNode = xmlNode.SelectSingleNode("adjustedPaymentDate");
     
     if (adjustedPaymentDateNode != null)
     {
         if (adjustedPaymentDateNode.Attributes["href"] != null || adjustedPaymentDateNode.Attributes["id"] != null) 
         {
             if (adjustedPaymentDateNode.Attributes["id"] != null) 
             {
                 adjustedPaymentDateIDRef_ = adjustedPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(adjustedPaymentDateNode);
                 IDManager.SetID(adjustedPaymentDateIDRef_, ob);
             }
             else if (adjustedPaymentDateNode.Attributes["href"] != null)
             {
                 adjustedPaymentDateIDRef_ = adjustedPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustedPaymentDate_ = new XsdTypeDate(adjustedPaymentDateNode);
             }
         }
         else
         {
             adjustedPaymentDate_ = new XsdTypeDate(adjustedPaymentDateNode);
         }
     }
     
 
     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;
                 Money ob = new Money(paymentAmountNode);
                 IDManager.SetID(paymentAmountIDRef_, ob);
             }
             else if (paymentAmountNode.Attributes["href"] != null)
             {
                 paymentAmountIDRef_ = paymentAmountNode.Attributes["href"].Value;
             }
             else
             {
                 paymentAmount_ = new Money(paymentAmountNode);
             }
         }
         else
         {
             paymentAmount_ = new Money(paymentAmountNode);
         }
     }
     
 
 }
 public StubValue(XmlNode xmlNode)
 {
     XmlNodeList floatingRateNodeList = xmlNode.SelectNodes("floatingRate");
     
     foreach (XmlNode item in floatingRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingRateIDRef = item.Attributes["id"].Name;
                 List<FloatingRate> ob = new List<FloatingRate>();
                 ob.Add(new FloatingRate(item));
                 IDManager.SetID(floatingRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             floatingRate.Add(new FloatingRate(item));
             }
         }
     }
     
 
     XmlNodeList stubRateNodeList = xmlNode.SelectNodes("stubRate");
     if (stubRateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubRateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubRateIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(stubRateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubRateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubRate = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList stubAmountNodeList = xmlNode.SelectNodes("stubAmount");
     if (stubAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(stubAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubAmount = new Money(item);
             }
         }
     }
     
 
 }
 public ProtectionTerms(XmlNode xmlNode)
 {
     XmlNodeList calculationAmountNodeList = xmlNode.SelectNodes("calculationAmount");
     if (calculationAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(calculationAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents");
     if (creditEventsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditEventsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditEventsIDRef = item.Attributes["id"].Name;
                 CreditEvents ob = CreditEvents();
                 IDManager.SetID(creditEventsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditEventsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditEvents = new CreditEvents(item);
             }
         }
     }
     
 
     XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations");
     if (obligationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in obligationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 obligationsIDRef = item.Attributes["id"].Name;
                 Obligations ob = Obligations();
                 IDManager.SetID(obligationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 obligationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 obligations = new Obligations(item);
             }
         }
     }
     
 
     XmlNodeList floatingAmountEventsNodeList = xmlNode.SelectNodes("floatingAmountEvents");
     if (floatingAmountEventsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingAmountEventsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingAmountEventsIDRef = item.Attributes["id"].Name;
                 FloatingAmountEvents ob = FloatingAmountEvents();
                 IDManager.SetID(floatingAmountEventsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingAmountEventsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingAmountEvents = new FloatingAmountEvents(item);
             }
         }
     }
     
 
 }
 public BasketConstituent(XmlNode xmlNode)
 {
     XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset");
     if (underlyingAssetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyingAssetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef = item.Attributes["id"].Name;
                 Asset ob = Asset();
                 IDManager.SetID(underlyingAssetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyingAssetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyingAsset = new Asset(item);
             }
         }
     }
     
 
     XmlNodeList basketNodeList = xmlNode.SelectNodes("basket");
     if (basketNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketIDRef = item.Attributes["id"].Name;
                 Basket ob = Basket();
                 IDManager.SetID(basketIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basket = new Basket(item);
             }
         }
     }
     
 
     XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");
     if (bondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondIDRef = item.Attributes["id"].Name;
                 Bond ob = Bond();
                 IDManager.SetID(bondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bond = new Bond(item);
             }
         }
     }
     
 
     XmlNodeList cashNodeList = xmlNode.SelectNodes("cash");
     if (cashNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashIDRef = item.Attributes["id"].Name;
                 Cash ob = Cash();
                 IDManager.SetID(cashIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cash = new Cash(item);
             }
         }
     }
     
 
     XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");
     if (commodityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIDRef = item.Attributes["id"].Name;
                 Commodity ob = Commodity();
                 IDManager.SetID(commodityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodity = new Commodity(item);
             }
         }
     }
     
 
     XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");
     if (convertibleBondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in convertibleBondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 convertibleBondIDRef = item.Attributes["id"].Name;
                 ConvertibleBond ob = ConvertibleBond();
                 IDManager.SetID(convertibleBondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 convertibleBondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 convertibleBond = new ConvertibleBond(item);
             }
         }
     }
     
 
     XmlNodeList equityNodeList = xmlNode.SelectNodes("equity");
     if (equityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityIDRef = item.Attributes["id"].Name;
                 EquityAsset ob = EquityAsset();
                 IDManager.SetID(equityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equity = new EquityAsset(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund");
     if (exchangeTradedFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef = item.Attributes["id"].Name;
                 ExchangeTradedFund ob = ExchangeTradedFund();
                 IDManager.SetID(exchangeTradedFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedFund = new ExchangeTradedFund(item);
             }
         }
     }
     
 
     XmlNodeList futureNodeList = xmlNode.SelectNodes("future");
     if (futureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futureIDRef = item.Attributes["id"].Name;
                 Future ob = Future();
                 IDManager.SetID(futureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 future = new Future(item);
             }
         }
     }
     
 
     XmlNodeList indexNodeList = xmlNode.SelectNodes("index");
     if (indexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexIDRef = item.Attributes["id"].Name;
                 Index ob = Index();
                 IDManager.SetID(indexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 index = new Index(item);
             }
         }
     }
     
 
     XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");
     if (loanNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loanNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loanIDRef = item.Attributes["id"].Name;
                 Loan ob = Loan();
                 IDManager.SetID(loanIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loanIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loan = new Loan(item);
             }
         }
     }
     
 
     XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");
     if (mortgageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mortgageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mortgageIDRef = item.Attributes["id"].Name;
                 Mortgage ob = Mortgage();
                 IDManager.SetID(mortgageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mortgageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mortgage = new Mortgage(item);
             }
         }
     }
     
 
     XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund");
     if (mutualFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mutualFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mutualFundIDRef = item.Attributes["id"].Name;
                 MutualFund ob = MutualFund();
                 IDManager.SetID(mutualFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mutualFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mutualFund = new MutualFund(item);
             }
         }
     }
     
 
     XmlNodeList constituentWeightNodeList = xmlNode.SelectNodes("constituentWeight");
     if (constituentWeightNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in constituentWeightNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 constituentWeightIDRef = item.Attributes["id"].Name;
                 ConstituentWeight ob = ConstituentWeight();
                 IDManager.SetID(constituentWeightIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 constituentWeightIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 constituentWeight = new ConstituentWeight(item);
             }
         }
     }
     
 
     XmlNodeList dividendPayoutNodeList = xmlNode.SelectNodes("dividendPayout");
     if (dividendPayoutNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendPayoutNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendPayoutIDRef = item.Attributes["id"].Name;
                 DividendPayout ob = DividendPayout();
                 IDManager.SetID(dividendPayoutIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendPayoutIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendPayout = new DividendPayout(item);
             }
         }
     }
     
 
     XmlNodeList underlyerPriceNodeList = xmlNode.SelectNodes("underlyerPrice");
     if (underlyerPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerPriceIDRef = item.Attributes["id"].Name;
                 Price ob = Price();
                 IDManager.SetID(underlyerPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerPrice = new Price(item);
             }
         }
     }
     
 
     XmlNodeList underlyerNotionalNodeList = xmlNode.SelectNodes("underlyerNotional");
     if (underlyerNotionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerNotionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerNotionalIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(underlyerNotionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerNotionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerNotional = new Money(item);
             }
         }
     }
     
 
     XmlNodeList underlyerSpreadNodeList = xmlNode.SelectNodes("underlyerSpread");
     if (underlyerSpreadNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerSpreadNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerSpreadIDRef = item.Attributes["id"].Name;
                 SpreadScheduleReference ob = SpreadScheduleReference();
                 IDManager.SetID(underlyerSpreadIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerSpreadIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerSpread = new SpreadScheduleReference(item);
             }
         }
     }
     
 
     XmlNodeList couponPaymentNodeList = xmlNode.SelectNodes("couponPayment");
     if (couponPaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in couponPaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 couponPaymentIDRef = item.Attributes["id"].Name;
                 PendingPayment ob = PendingPayment();
                 IDManager.SetID(couponPaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 couponPaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 couponPayment = new PendingPayment(item);
             }
         }
     }
     
 
 }
 public ConstituentWeight(XmlNode xmlNode)
 {
     XmlNodeList openUnitsNodeList = xmlNode.SelectNodes("openUnits");
     if (openUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in openUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 openUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(openUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 openUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 openUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList basketPercentageNodeList = xmlNode.SelectNodes("basketPercentage");
     if (basketPercentageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketPercentageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketPercentageIDRef = item.Attributes["id"].Name;
                 RestrictedPercentage ob = RestrictedPercentage();
                 IDManager.SetID(basketPercentageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketPercentageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basketPercentage = new RestrictedPercentage(item);
             }
         }
     }
     
 
     XmlNodeList basketAmountNodeList = xmlNode.SelectNodes("basketAmount");
     if (basketAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(basketAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basketAmount = new Money(item);
             }
         }
     }
     
 
 }
 public OptionBaseExtended(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode premiumNode = xmlNode.SelectSingleNode("premium");
     
     if (premiumNode != null)
     {
         if (premiumNode.Attributes["href"] != null || premiumNode.Attributes["id"] != null) 
         {
             if (premiumNode.Attributes["id"] != null) 
             {
                 premiumIDRef_ = premiumNode.Attributes["id"].Value;
                 Premium ob = new Premium(premiumNode);
                 IDManager.SetID(premiumIDRef_, ob);
             }
             else if (premiumNode.Attributes["href"] != null)
             {
                 premiumIDRef_ = premiumNode.Attributes["href"].Value;
             }
             else
             {
                 premium_ = new Premium(premiumNode);
             }
         }
         else
         {
             premium_ = new Premium(premiumNode);
         }
     }
     
 
     XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise");
     
     if (exerciseNode != null)
     {
         if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) 
         {
             if (exerciseNode.Attributes["id"] != null) 
             {
                 exerciseIDRef_ = exerciseNode.Attributes["id"].Value;
                 Exercise ob = new Exercise(exerciseNode);
                 IDManager.SetID(exerciseIDRef_, ob);
             }
             else if (exerciseNode.Attributes["href"] != null)
             {
                 exerciseIDRef_ = exerciseNode.Attributes["href"].Value;
             }
             else
             {
                 exercise_ = new Exercise(exerciseNode);
             }
         }
         else
         {
             exercise_ = new Exercise(exerciseNode);
         }
     }
     
 
     XmlNode americanExerciseNode = xmlNode.SelectSingleNode("americanExercise");
     
     if (americanExerciseNode != null)
     {
         if (americanExerciseNode.Attributes["href"] != null || americanExerciseNode.Attributes["id"] != null) 
         {
             if (americanExerciseNode.Attributes["id"] != null) 
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["id"].Value;
                 AmericanExercise ob = new AmericanExercise(americanExerciseNode);
                 IDManager.SetID(americanExerciseIDRef_, ob);
             }
             else if (americanExerciseNode.Attributes["href"] != null)
             {
                 americanExerciseIDRef_ = americanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 americanExercise_ = new AmericanExercise(americanExerciseNode);
             }
         }
         else
         {
             americanExercise_ = new AmericanExercise(americanExerciseNode);
         }
     }
     
 
     XmlNode bermudaExerciseNode = xmlNode.SelectSingleNode("bermudaExercise");
     
     if (bermudaExerciseNode != null)
     {
         if (bermudaExerciseNode.Attributes["href"] != null || bermudaExerciseNode.Attributes["id"] != null) 
         {
             if (bermudaExerciseNode.Attributes["id"] != null) 
             {
                 bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["id"].Value;
                 BermudaExercise ob = new BermudaExercise(bermudaExerciseNode);
                 IDManager.SetID(bermudaExerciseIDRef_, ob);
             }
             else if (bermudaExerciseNode.Attributes["href"] != null)
             {
                 bermudaExerciseIDRef_ = bermudaExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
             }
         }
         else
         {
             bermudaExercise_ = new BermudaExercise(bermudaExerciseNode);
         }
     }
     
 
     XmlNode europeanExerciseNode = xmlNode.SelectSingleNode("europeanExercise");
     
     if (europeanExerciseNode != null)
     {
         if (europeanExerciseNode.Attributes["href"] != null || europeanExerciseNode.Attributes["id"] != null) 
         {
             if (europeanExerciseNode.Attributes["id"] != null) 
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["id"].Value;
                 EuropeanExercise ob = new EuropeanExercise(europeanExerciseNode);
                 IDManager.SetID(europeanExerciseIDRef_, ob);
             }
             else if (europeanExerciseNode.Attributes["href"] != null)
             {
                 europeanExerciseIDRef_ = europeanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
             }
         }
         else
         {
             europeanExercise_ = new EuropeanExercise(europeanExerciseNode);
         }
     }
     
 
     XmlNode exerciseProcedureNode = xmlNode.SelectSingleNode("exerciseProcedure");
     
     if (exerciseProcedureNode != null)
     {
         if (exerciseProcedureNode.Attributes["href"] != null || exerciseProcedureNode.Attributes["id"] != null) 
         {
             if (exerciseProcedureNode.Attributes["id"] != null) 
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["id"].Value;
                 ExerciseProcedure ob = new ExerciseProcedure(exerciseProcedureNode);
                 IDManager.SetID(exerciseProcedureIDRef_, ob);
             }
             else if (exerciseProcedureNode.Attributes["href"] != null)
             {
                 exerciseProcedureIDRef_ = exerciseProcedureNode.Attributes["href"].Value;
             }
             else
             {
                 exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
             }
         }
         else
         {
             exerciseProcedure_ = new ExerciseProcedure(exerciseProcedureNode);
         }
     }
     
 
     XmlNode featureNode = xmlNode.SelectSingleNode("feature");
     
     if (featureNode != null)
     {
         if (featureNode.Attributes["href"] != null || featureNode.Attributes["id"] != null) 
         {
             if (featureNode.Attributes["id"] != null) 
             {
                 featureIDRef_ = featureNode.Attributes["id"].Value;
                 OptionFeature ob = new OptionFeature(featureNode);
                 IDManager.SetID(featureIDRef_, ob);
             }
             else if (featureNode.Attributes["href"] != null)
             {
                 featureIDRef_ = featureNode.Attributes["href"].Value;
             }
             else
             {
                 feature_ = new OptionFeature(featureNode);
             }
         }
         else
         {
             feature_ = new OptionFeature(featureNode);
         }
     }
     
 
     XmlNode notionalReferenceNode = xmlNode.SelectSingleNode("notionalReference");
     
     if (notionalReferenceNode != null)
     {
         if (notionalReferenceNode.Attributes["href"] != null || notionalReferenceNode.Attributes["id"] != null) 
         {
             if (notionalReferenceNode.Attributes["id"] != null) 
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["id"].Value;
                 NotionalAmountReference ob = new NotionalAmountReference(notionalReferenceNode);
                 IDManager.SetID(notionalReferenceIDRef_, ob);
             }
             else if (notionalReferenceNode.Attributes["href"] != null)
             {
                 notionalReferenceIDRef_ = notionalReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 notionalReference_ = new NotionalAmountReference(notionalReferenceNode);
             }
         }
         else
         {
             notionalReference_ = new NotionalAmountReference(notionalReferenceNode);
         }
     }
     
 
     XmlNode notionalAmountNode = xmlNode.SelectSingleNode("notionalAmount");
     
     if (notionalAmountNode != null)
     {
         if (notionalAmountNode.Attributes["href"] != null || notionalAmountNode.Attributes["id"] != null) 
         {
             if (notionalAmountNode.Attributes["id"] != null) 
             {
                 notionalAmountIDRef_ = notionalAmountNode.Attributes["id"].Value;
                 Money ob = new Money(notionalAmountNode);
                 IDManager.SetID(notionalAmountIDRef_, ob);
             }
             else if (notionalAmountNode.Attributes["href"] != null)
             {
                 notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 notionalAmount_ = new Money(notionalAmountNode);
             }
         }
         else
         {
             notionalAmount_ = new Money(notionalAmountNode);
         }
     }
     
 
     XmlNode optionEntitlementNode = xmlNode.SelectSingleNode("optionEntitlement");
     
     if (optionEntitlementNode != null)
     {
         if (optionEntitlementNode.Attributes["href"] != null || optionEntitlementNode.Attributes["id"] != null) 
         {
             if (optionEntitlementNode.Attributes["id"] != null) 
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(optionEntitlementNode);
                 IDManager.SetID(optionEntitlementIDRef_, ob);
             }
             else if (optionEntitlementNode.Attributes["href"] != null)
             {
                 optionEntitlementIDRef_ = optionEntitlementNode.Attributes["href"].Value;
             }
             else
             {
                 optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
             }
         }
         else
         {
             optionEntitlement_ = new PositiveDecimal(optionEntitlementNode);
         }
     }
     
 
     XmlNode entitlementCurrencyNode = xmlNode.SelectSingleNode("entitlementCurrency");
     
     if (entitlementCurrencyNode != null)
     {
         if (entitlementCurrencyNode.Attributes["href"] != null || entitlementCurrencyNode.Attributes["id"] != null) 
         {
             if (entitlementCurrencyNode.Attributes["id"] != null) 
             {
                 entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(entitlementCurrencyNode);
                 IDManager.SetID(entitlementCurrencyIDRef_, ob);
             }
             else if (entitlementCurrencyNode.Attributes["href"] != null)
             {
                 entitlementCurrencyIDRef_ = entitlementCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 entitlementCurrency_ = new Currency(entitlementCurrencyNode);
             }
         }
         else
         {
             entitlementCurrency_ = new Currency(entitlementCurrencyNode);
         }
     }
     
 
     XmlNode numberOfOptionsNode = xmlNode.SelectSingleNode("numberOfOptions");
     
     if (numberOfOptionsNode != null)
     {
         if (numberOfOptionsNode.Attributes["href"] != null || numberOfOptionsNode.Attributes["id"] != null) 
         {
             if (numberOfOptionsNode.Attributes["id"] != null) 
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(numberOfOptionsNode);
                 IDManager.SetID(numberOfOptionsIDRef_, ob);
             }
             else if (numberOfOptionsNode.Attributes["href"] != null)
             {
                 numberOfOptionsIDRef_ = numberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode);
             }
         }
         else
         {
             numberOfOptions_ = new PositiveDecimal(numberOfOptionsNode);
         }
     }
     
 
     XmlNode settlementTypeNode = xmlNode.SelectSingleNode("settlementType");
     
     if (settlementTypeNode != null)
     {
         if (settlementTypeNode.Attributes["href"] != null || settlementTypeNode.Attributes["id"] != null) 
         {
             if (settlementTypeNode.Attributes["id"] != null) 
             {
                 settlementTypeIDRef_ = settlementTypeNode.Attributes["id"].Value;
                 SettlementTypeEnum ob = new SettlementTypeEnum(settlementTypeNode);
                 IDManager.SetID(settlementTypeIDRef_, ob);
             }
             else if (settlementTypeNode.Attributes["href"] != null)
             {
                 settlementTypeIDRef_ = settlementTypeNode.Attributes["href"].Value;
             }
             else
             {
                 settlementType_ = new SettlementTypeEnum(settlementTypeNode);
             }
         }
         else
         {
             settlementType_ = new SettlementTypeEnum(settlementTypeNode);
         }
     }
     
 
     XmlNode settlementDateNode = xmlNode.SelectSingleNode("settlementDate");
     
     if (settlementDateNode != null)
     {
         if (settlementDateNode.Attributes["href"] != null || settlementDateNode.Attributes["id"] != null) 
         {
             if (settlementDateNode.Attributes["id"] != null) 
             {
                 settlementDateIDRef_ = settlementDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementDateNode);
                 IDManager.SetID(settlementDateIDRef_, ob);
             }
             else if (settlementDateNode.Attributes["href"] != null)
             {
                 settlementDateIDRef_ = settlementDateNode.Attributes["href"].Value;
             }
             else
             {
                 settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode);
             }
         }
         else
         {
             settlementDate_ = new AdjustableOrRelativeDate(settlementDateNode);
         }
     }
     
 
     XmlNode settlementAmountNode = xmlNode.SelectSingleNode("settlementAmount");
     
     if (settlementAmountNode != null)
     {
         if (settlementAmountNode.Attributes["href"] != null || settlementAmountNode.Attributes["id"] != null) 
         {
             if (settlementAmountNode.Attributes["id"] != null) 
             {
                 settlementAmountIDRef_ = settlementAmountNode.Attributes["id"].Value;
                 Money ob = new Money(settlementAmountNode);
                 IDManager.SetID(settlementAmountIDRef_, ob);
             }
             else if (settlementAmountNode.Attributes["href"] != null)
             {
                 settlementAmountIDRef_ = settlementAmountNode.Attributes["href"].Value;
             }
             else
             {
                 settlementAmount_ = new Money(settlementAmountNode);
             }
         }
         else
         {
             settlementAmount_ = new Money(settlementAmountNode);
         }
     }
     
 
     XmlNode settlementCurrencyNode = xmlNode.SelectSingleNode("settlementCurrency");
     
     if (settlementCurrencyNode != null)
     {
         if (settlementCurrencyNode.Attributes["href"] != null || settlementCurrencyNode.Attributes["id"] != null) 
         {
             if (settlementCurrencyNode.Attributes["id"] != null) 
             {
                 settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(settlementCurrencyNode);
                 IDManager.SetID(settlementCurrencyIDRef_, ob);
             }
             else if (settlementCurrencyNode.Attributes["href"] != null)
             {
                 settlementCurrencyIDRef_ = settlementCurrencyNode.Attributes["href"].Value;
             }
             else
             {
                 settlementCurrency_ = new Currency(settlementCurrencyNode);
             }
         }
         else
         {
             settlementCurrency_ = new Currency(settlementCurrencyNode);
         }
     }
     
 
 }
 public Allocation(XmlNode xmlNode)
 {
     XmlNodeList allocationTradeIdNodeList = xmlNode.SelectNodes("allocationTradeId");
     
     foreach (XmlNode item in allocationTradeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 allocationTradeIdIDRef = item.Attributes["id"].Name;
                 List<TradeIdentifier> ob = new List<TradeIdentifier>();
                 ob.Add(new TradeIdentifier(item));
                 IDManager.SetID(allocationTradeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 allocationTradeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
             allocationTradeId.Add(new TradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");
     if (partyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(partyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");
     if (accountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(accountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList allocatedFractionNodeList = xmlNode.SelectNodes("allocatedFraction");
     if (allocatedFractionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in allocatedFractionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 allocatedFractionIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(allocatedFractionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 allocatedFractionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 allocatedFraction = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList allocatedNotionalNodeList = xmlNode.SelectNodes("allocatedNotional");
     
     foreach (XmlNode item in allocatedNotionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 allocatedNotionalIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(allocatedNotionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 allocatedNotionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
             allocatedNotional.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList collateralNodeList = xmlNode.SelectNodes("collateral");
     if (collateralNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in collateralNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 collateralIDRef = item.Attributes["id"].Name;
                 Collateral ob = Collateral();
                 IDManager.SetID(collateralIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 collateralIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 collateral = new Collateral(item);
             }
         }
     }
     
 
     XmlNodeList creditChargeAmountNodeList = xmlNode.SelectNodes("creditChargeAmount");
     if (creditChargeAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditChargeAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditChargeAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(creditChargeAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditChargeAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditChargeAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList approvalsNodeList = xmlNode.SelectNodes("approvals");
     if (approvalsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in approvalsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 approvalsIDRef = item.Attributes["id"].Name;
                 Approvals ob = Approvals();
                 IDManager.SetID(approvalsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 approvalsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 approvals = new Approvals(item);
             }
         }
     }
     
 
     XmlNodeList masterConfirmationDateNodeList = xmlNode.SelectNodes("masterConfirmationDate");
     if (masterConfirmationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in masterConfirmationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 masterConfirmationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(masterConfirmationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 masterConfirmationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 masterConfirmationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList relatedPartyNodeList = xmlNode.SelectNodes("relatedParty");
     
     foreach (XmlNode item in relatedPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relatedPartyIDRef = item.Attributes["id"].Name;
                 List<RelatedParty> ob = new List<RelatedParty>();
                 ob.Add(new RelatedParty(item));
                 IDManager.SetID(relatedPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relatedPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
             relatedParty.Add(new RelatedParty(item));
             }
         }
     }
     
 
 }
 public SplitSettlement(XmlNode xmlNode)
 {
     XmlNodeList splitSettlementAmountNodeList = xmlNode.SelectNodes("splitSettlementAmount");
     if (splitSettlementAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in splitSettlementAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 splitSettlementAmountIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(splitSettlementAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 splitSettlementAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 splitSettlementAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList beneficiaryBankNodeList = xmlNode.SelectNodes("beneficiaryBank");
     if (beneficiaryBankNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in beneficiaryBankNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 beneficiaryBankIDRef = item.Attributes["id"].Name;
                 Routing ob = Routing();
                 IDManager.SetID(beneficiaryBankIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 beneficiaryBankIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 beneficiaryBank = new Routing(item);
             }
         }
     }
     
 
     XmlNodeList beneficiaryNodeList = xmlNode.SelectNodes("beneficiary");
     if (beneficiaryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in beneficiaryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 beneficiaryIDRef = item.Attributes["id"].Name;
                 Routing ob = Routing();
                 IDManager.SetID(beneficiaryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 beneficiaryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 beneficiary = new Routing(item);
             }
         }
     }
     
 
 }
 public InitialPayment(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 adjustablePaymentDateNodeList = xmlNode.SelectNodes("adjustablePaymentDate");
     if (adjustablePaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustablePaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustablePaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustablePaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustablePaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustablePaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList adjustedPaymentDateNodeList = xmlNode.SelectNodes("adjustedPaymentDate");
     if (adjustedPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustedPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustedPaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(adjustedPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustedPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustedPaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     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;
                 Money ob = Money();
                 IDManager.SetID(paymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentAmount = new Money(item);
             }
         }
     }
     
 
 }
 public PaymentDetail(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList paymentDateNodeList = xmlNode.SelectNodes("paymentDate");
     if (paymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(paymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     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;
                 Money ob = Money();
                 IDManager.SetID(paymentAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentAmount = new Money(item);
             }
         }
     }
     
 
     XmlNodeList paymentRuleNodeList = xmlNode.SelectNodes("paymentRule");
     if (paymentRuleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentRuleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentRuleIDRef = item.Attributes["id"].Name;
                 PaymentRule ob = PaymentRule();
                 IDManager.SetID(paymentRuleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentRuleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentRule = new PaymentRule(item);
             }
         }
     }
     
 
 }
 public GrossCashflow(XmlNode xmlNode)
 {
     XmlNode cashflowIdNode = xmlNode.SelectSingleNode("cashflowId");
     
     if (cashflowIdNode != null)
     {
         if (cashflowIdNode.Attributes["href"] != null || cashflowIdNode.Attributes["id"] != null) 
         {
             if (cashflowIdNode.Attributes["id"] != null) 
             {
                 cashflowIdIDRef_ = cashflowIdNode.Attributes["id"].Value;
                 CashflowId ob = new CashflowId(cashflowIdNode);
                 IDManager.SetID(cashflowIdIDRef_, ob);
             }
             else if (cashflowIdNode.Attributes["href"] != null)
             {
                 cashflowIdIDRef_ = cashflowIdNode.Attributes["href"].Value;
             }
             else
             {
                 cashflowId_ = new CashflowId(cashflowIdNode);
             }
         }
         else
         {
             cashflowId_ = new CashflowId(cashflowIdNode);
         }
     }
     
 
     XmlNode partyTradeIdentifierReferenceNode = xmlNode.SelectSingleNode("partyTradeIdentifierReference");
     
     if (partyTradeIdentifierReferenceNode != null)
     {
         if (partyTradeIdentifierReferenceNode.Attributes["href"] != null || partyTradeIdentifierReferenceNode.Attributes["id"] != null) 
         {
             if (partyTradeIdentifierReferenceNode.Attributes["id"] != null) 
             {
                 partyTradeIdentifierReferenceIDRef_ = partyTradeIdentifierReferenceNode.Attributes["id"].Value;
                 PartyTradeIdentifierReference ob = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
                 IDManager.SetID(partyTradeIdentifierReferenceIDRef_, ob);
             }
             else if (partyTradeIdentifierReferenceNode.Attributes["href"] != null)
             {
                 partyTradeIdentifierReferenceIDRef_ = partyTradeIdentifierReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partyTradeIdentifierReference_ = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
             }
         }
         else
         {
             partyTradeIdentifierReference_ = new PartyTradeIdentifierReference(partyTradeIdentifierReferenceNode);
         }
     }
     
 
     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 cashflowAmountNode = xmlNode.SelectSingleNode("cashflowAmount");
     
     if (cashflowAmountNode != null)
     {
         if (cashflowAmountNode.Attributes["href"] != null || cashflowAmountNode.Attributes["id"] != null) 
         {
             if (cashflowAmountNode.Attributes["id"] != null) 
             {
                 cashflowAmountIDRef_ = cashflowAmountNode.Attributes["id"].Value;
                 Money ob = new Money(cashflowAmountNode);
                 IDManager.SetID(cashflowAmountIDRef_, ob);
             }
             else if (cashflowAmountNode.Attributes["href"] != null)
             {
                 cashflowAmountIDRef_ = cashflowAmountNode.Attributes["href"].Value;
             }
             else
             {
                 cashflowAmount_ = new Money(cashflowAmountNode);
             }
         }
         else
         {
             cashflowAmount_ = new Money(cashflowAmountNode);
         }
     }
     
 
     XmlNode cashflowTypeNode = xmlNode.SelectSingleNode("cashflowType");
     
     if (cashflowTypeNode != null)
     {
         if (cashflowTypeNode.Attributes["href"] != null || cashflowTypeNode.Attributes["id"] != null) 
         {
             if (cashflowTypeNode.Attributes["id"] != null) 
             {
                 cashflowTypeIDRef_ = cashflowTypeNode.Attributes["id"].Value;
                 CashflowType ob = new CashflowType(cashflowTypeNode);
                 IDManager.SetID(cashflowTypeIDRef_, ob);
             }
             else if (cashflowTypeNode.Attributes["href"] != null)
             {
                 cashflowTypeIDRef_ = cashflowTypeNode.Attributes["href"].Value;
             }
             else
             {
                 cashflowType_ = new CashflowType(cashflowTypeNode);
             }
         }
         else
         {
             cashflowType_ = new CashflowType(cashflowTypeNode);
         }
     }
     
 
 }