public EquityExerciseValuationSettlement(XmlNode xmlNode)
 {
     XmlNode equityEuropeanExerciseNode = xmlNode.SelectSingleNode("equityEuropeanExercise");
     
     if (equityEuropeanExerciseNode != null)
     {
         if (equityEuropeanExerciseNode.Attributes["href"] != null || equityEuropeanExerciseNode.Attributes["id"] != null) 
         {
             if (equityEuropeanExerciseNode.Attributes["id"] != null) 
             {
                 equityEuropeanExerciseIDRef_ = equityEuropeanExerciseNode.Attributes["id"].Value;
                 EquityEuropeanExercise ob = new EquityEuropeanExercise(equityEuropeanExerciseNode);
                 IDManager.SetID(equityEuropeanExerciseIDRef_, ob);
             }
             else if (equityEuropeanExerciseNode.Attributes["href"] != null)
             {
                 equityEuropeanExerciseIDRef_ = equityEuropeanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 equityEuropeanExercise_ = new EquityEuropeanExercise(equityEuropeanExerciseNode);
             }
         }
         else
         {
             equityEuropeanExercise_ = new EquityEuropeanExercise(equityEuropeanExerciseNode);
         }
     }
     
 
     XmlNode equityAmericanExerciseNode = xmlNode.SelectSingleNode("equityAmericanExercise");
     
     if (equityAmericanExerciseNode != null)
     {
         if (equityAmericanExerciseNode.Attributes["href"] != null || equityAmericanExerciseNode.Attributes["id"] != null) 
         {
             if (equityAmericanExerciseNode.Attributes["id"] != null) 
             {
                 equityAmericanExerciseIDRef_ = equityAmericanExerciseNode.Attributes["id"].Value;
                 EquityAmericanExercise ob = new EquityAmericanExercise(equityAmericanExerciseNode);
                 IDManager.SetID(equityAmericanExerciseIDRef_, ob);
             }
             else if (equityAmericanExerciseNode.Attributes["href"] != null)
             {
                 equityAmericanExerciseIDRef_ = equityAmericanExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 equityAmericanExercise_ = new EquityAmericanExercise(equityAmericanExerciseNode);
             }
         }
         else
         {
             equityAmericanExercise_ = new EquityAmericanExercise(equityAmericanExerciseNode);
         }
     }
     
 
     XmlNode equityBermudaExerciseNode = xmlNode.SelectSingleNode("equityBermudaExercise");
     
     if (equityBermudaExerciseNode != null)
     {
         if (equityBermudaExerciseNode.Attributes["href"] != null || equityBermudaExerciseNode.Attributes["id"] != null) 
         {
             if (equityBermudaExerciseNode.Attributes["id"] != null) 
             {
                 equityBermudaExerciseIDRef_ = equityBermudaExerciseNode.Attributes["id"].Value;
                 EquityBermudaExercise ob = new EquityBermudaExercise(equityBermudaExerciseNode);
                 IDManager.SetID(equityBermudaExerciseIDRef_, ob);
             }
             else if (equityBermudaExerciseNode.Attributes["href"] != null)
             {
                 equityBermudaExerciseIDRef_ = equityBermudaExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 equityBermudaExercise_ = new EquityBermudaExercise(equityBermudaExerciseNode);
             }
         }
         else
         {
             equityBermudaExercise_ = new EquityBermudaExercise(equityBermudaExerciseNode);
         }
     }
     
 
     XmlNode automaticExerciseNode = xmlNode.SelectSingleNode("automaticExercise");
     
     if (automaticExerciseNode != null)
     {
         if (automaticExerciseNode.Attributes["href"] != null || automaticExerciseNode.Attributes["id"] != null) 
         {
             if (automaticExerciseNode.Attributes["id"] != null) 
             {
                 automaticExerciseIDRef_ = automaticExerciseNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(automaticExerciseNode);
                 IDManager.SetID(automaticExerciseIDRef_, ob);
             }
             else if (automaticExerciseNode.Attributes["href"] != null)
             {
                 automaticExerciseIDRef_ = automaticExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 automaticExercise_ = new XsdTypeBoolean(automaticExerciseNode);
             }
         }
         else
         {
             automaticExercise_ = new XsdTypeBoolean(automaticExerciseNode);
         }
     }
     
 
     XmlNode makeWholeProvisionsNode = xmlNode.SelectSingleNode("makeWholeProvisions");
     
     if (makeWholeProvisionsNode != null)
     {
         if (makeWholeProvisionsNode.Attributes["href"] != null || makeWholeProvisionsNode.Attributes["id"] != null) 
         {
             if (makeWholeProvisionsNode.Attributes["id"] != null) 
             {
                 makeWholeProvisionsIDRef_ = makeWholeProvisionsNode.Attributes["id"].Value;
                 MakeWholeProvisions ob = new MakeWholeProvisions(makeWholeProvisionsNode);
                 IDManager.SetID(makeWholeProvisionsIDRef_, ob);
             }
             else if (makeWholeProvisionsNode.Attributes["href"] != null)
             {
                 makeWholeProvisionsIDRef_ = makeWholeProvisionsNode.Attributes["href"].Value;
             }
             else
             {
                 makeWholeProvisions_ = new MakeWholeProvisions(makeWholeProvisionsNode);
             }
         }
         else
         {
             makeWholeProvisions_ = new MakeWholeProvisions(makeWholeProvisionsNode);
         }
     }
     
 
     XmlNode prePaymentNode = xmlNode.SelectSingleNode("prePayment");
     
     if (prePaymentNode != null)
     {
         if (prePaymentNode.Attributes["href"] != null || prePaymentNode.Attributes["id"] != null) 
         {
             if (prePaymentNode.Attributes["id"] != null) 
             {
                 prePaymentIDRef_ = prePaymentNode.Attributes["id"].Value;
                 PrePayment ob = new PrePayment(prePaymentNode);
                 IDManager.SetID(prePaymentIDRef_, ob);
             }
             else if (prePaymentNode.Attributes["href"] != null)
             {
                 prePaymentIDRef_ = prePaymentNode.Attributes["href"].Value;
             }
             else
             {
                 prePayment_ = new PrePayment(prePaymentNode);
             }
         }
         else
         {
             prePayment_ = new PrePayment(prePaymentNode);
         }
     }
     
 
     XmlNode equityValuationNode = xmlNode.SelectSingleNode("equityValuation");
     
     if (equityValuationNode != null)
     {
         if (equityValuationNode.Attributes["href"] != null || equityValuationNode.Attributes["id"] != null) 
         {
             if (equityValuationNode.Attributes["id"] != null) 
             {
                 equityValuationIDRef_ = equityValuationNode.Attributes["id"].Value;
                 EquityValuation ob = new EquityValuation(equityValuationNode);
                 IDManager.SetID(equityValuationIDRef_, ob);
             }
             else if (equityValuationNode.Attributes["href"] != null)
             {
                 equityValuationIDRef_ = equityValuationNode.Attributes["href"].Value;
             }
             else
             {
                 equityValuation_ = new EquityValuation(equityValuationNode);
             }
         }
         else
         {
             equityValuation_ = new EquityValuation(equityValuationNode);
         }
     }
     
 
     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 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);
         }
     }
     
 
     XmlNode settlementPriceSourceNode = xmlNode.SelectSingleNode("settlementPriceSource");
     
     if (settlementPriceSourceNode != null)
     {
         if (settlementPriceSourceNode.Attributes["href"] != null || settlementPriceSourceNode.Attributes["id"] != null) 
         {
             if (settlementPriceSourceNode.Attributes["id"] != null) 
             {
                 settlementPriceSourceIDRef_ = settlementPriceSourceNode.Attributes["id"].Value;
                 SettlementPriceSource ob = new SettlementPriceSource(settlementPriceSourceNode);
                 IDManager.SetID(settlementPriceSourceIDRef_, ob);
             }
             else if (settlementPriceSourceNode.Attributes["href"] != null)
             {
                 settlementPriceSourceIDRef_ = settlementPriceSourceNode.Attributes["href"].Value;
             }
             else
             {
                 settlementPriceSource_ = new SettlementPriceSource(settlementPriceSourceNode);
             }
         }
         else
         {
             settlementPriceSource_ = new SettlementPriceSource(settlementPriceSourceNode);
         }
     }
     
 
     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 settlementMethodElectionDateNode = xmlNode.SelectSingleNode("settlementMethodElectionDate");
     
     if (settlementMethodElectionDateNode != null)
     {
         if (settlementMethodElectionDateNode.Attributes["href"] != null || settlementMethodElectionDateNode.Attributes["id"] != null) 
         {
             if (settlementMethodElectionDateNode.Attributes["id"] != null) 
             {
                 settlementMethodElectionDateIDRef_ = settlementMethodElectionDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementMethodElectionDateNode);
                 IDManager.SetID(settlementMethodElectionDateIDRef_, ob);
             }
             else if (settlementMethodElectionDateNode.Attributes["href"] != null)
             {
                 settlementMethodElectionDateIDRef_ = settlementMethodElectionDateNode.Attributes["href"].Value;
             }
             else
             {
                 settlementMethodElectionDate_ = new AdjustableOrRelativeDate(settlementMethodElectionDateNode);
             }
         }
         else
         {
             settlementMethodElectionDate_ = new AdjustableOrRelativeDate(settlementMethodElectionDateNode);
         }
     }
     
 
     XmlNode settlementMethodElectingPartyReferenceNode = xmlNode.SelectSingleNode("settlementMethodElectingPartyReference");
     
     if (settlementMethodElectingPartyReferenceNode != null)
     {
         if (settlementMethodElectingPartyReferenceNode.Attributes["href"] != null || settlementMethodElectingPartyReferenceNode.Attributes["id"] != null) 
         {
             if (settlementMethodElectingPartyReferenceNode.Attributes["id"] != null) 
             {
                 settlementMethodElectingPartyReferenceIDRef_ = settlementMethodElectingPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(settlementMethodElectingPartyReferenceNode);
                 IDManager.SetID(settlementMethodElectingPartyReferenceIDRef_, ob);
             }
             else if (settlementMethodElectingPartyReferenceNode.Attributes["href"] != null)
             {
                 settlementMethodElectingPartyReferenceIDRef_ = settlementMethodElectingPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 settlementMethodElectingPartyReference_ = new PartyReference(settlementMethodElectingPartyReferenceNode);
             }
         }
         else
         {
             settlementMethodElectingPartyReference_ = new PartyReference(settlementMethodElectingPartyReferenceNode);
         }
     }
     
 
     XmlNode settlementPriceDefaultElectionNode = xmlNode.SelectSingleNode("settlementPriceDefaultElection");
     
     if (settlementPriceDefaultElectionNode != null)
     {
         if (settlementPriceDefaultElectionNode.Attributes["href"] != null || settlementPriceDefaultElectionNode.Attributes["id"] != null) 
         {
             if (settlementPriceDefaultElectionNode.Attributes["id"] != null) 
             {
                 settlementPriceDefaultElectionIDRef_ = settlementPriceDefaultElectionNode.Attributes["id"].Value;
                 SettlementPriceDefaultElection ob = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode);
                 IDManager.SetID(settlementPriceDefaultElectionIDRef_, ob);
             }
             else if (settlementPriceDefaultElectionNode.Attributes["href"] != null)
             {
                 settlementPriceDefaultElectionIDRef_ = settlementPriceDefaultElectionNode.Attributes["href"].Value;
             }
             else
             {
                 settlementPriceDefaultElection_ = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode);
             }
         }
         else
         {
             settlementPriceDefaultElection_ = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode);
         }
     }
     
 
 }
        public EquityExerciseValuationSettlement(XmlNode xmlNode)
        {
            XmlNodeList equityEuropeanExerciseNodeList = xmlNode.SelectNodes("equityEuropeanExercise");

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

            foreach (XmlNode item in equityEuropeanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityEuropeanExerciseIDRef = item.Attributes["id"].Name;
                        EquityEuropeanExercise ob = EquityEuropeanExercise();
                        IDManager.SetID(equityEuropeanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityEuropeanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityEuropeanExercise = new EquityEuropeanExercise(item);
                    }
                }
            }


            XmlNodeList equityAmericanExerciseNodeList = xmlNode.SelectNodes("equityAmericanExercise");

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

            foreach (XmlNode item in equityAmericanExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityAmericanExerciseIDRef = item.Attributes["id"].Name;
                        EquityAmericanExercise ob = EquityAmericanExercise();
                        IDManager.SetID(equityAmericanExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityAmericanExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityAmericanExercise = new EquityAmericanExercise(item);
                    }
                }
            }


            XmlNodeList equityBermudaExerciseNodeList = xmlNode.SelectNodes("equityBermudaExercise");

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

            foreach (XmlNode item in equityBermudaExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityBermudaExerciseIDRef = item.Attributes["id"].Name;
                        EquityBermudaExercise ob = EquityBermudaExercise();
                        IDManager.SetID(equityBermudaExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityBermudaExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityBermudaExercise = new EquityBermudaExercise(item);
                    }
                }
            }


            XmlNodeList automaticExerciseNodeList = xmlNode.SelectNodes("automaticExercise");

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

            foreach (XmlNode item in automaticExerciseNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        automaticExerciseIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(automaticExerciseIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        automaticExerciseIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        automaticExercise = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList makeWholeProvisionsNodeList = xmlNode.SelectNodes("makeWholeProvisions");

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

            foreach (XmlNode item in makeWholeProvisionsNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        makeWholeProvisionsIDRef = item.Attributes["id"].Name;
                        MakeWholeProvisions ob = MakeWholeProvisions();
                        IDManager.SetID(makeWholeProvisionsIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        makeWholeProvisionsIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        makeWholeProvisions = new MakeWholeProvisions(item);
                    }
                }
            }


            XmlNodeList prePaymentNodeList = xmlNode.SelectNodes("prePayment");

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

            foreach (XmlNode item in prePaymentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        prePaymentIDRef = item.Attributes["id"].Name;
                        PrePayment ob = PrePayment();
                        IDManager.SetID(prePaymentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        prePaymentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        prePayment = new PrePayment(item);
                    }
                }
            }


            XmlNodeList equityValuationNodeList = xmlNode.SelectNodes("equityValuation");

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

            foreach (XmlNode item in equityValuationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        equityValuationIDRef = item.Attributes["id"].Name;
                        EquityValuation ob = EquityValuation();
                        IDManager.SetID(equityValuationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        equityValuationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        equityValuation = new EquityValuation(item);
                    }
                }
            }


            XmlNodeList settlementDateNodeList = xmlNode.SelectNodes("settlementDate");

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

            foreach (XmlNode item in settlementDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(settlementDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList settlementCurrencyNodeList = xmlNode.SelectNodes("settlementCurrency");

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

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


            XmlNodeList settlementPriceSourceNodeList = xmlNode.SelectNodes("settlementPriceSource");

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

            foreach (XmlNode item in settlementPriceSourceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementPriceSourceIDRef = item.Attributes["id"].Name;
                        SettlementPriceSource ob = SettlementPriceSource();
                        IDManager.SetID(settlementPriceSourceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementPriceSourceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementPriceSource = new SettlementPriceSource(item);
                    }
                }
            }


            XmlNodeList settlementTypeNodeList = xmlNode.SelectNodes("settlementType");

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

            foreach (XmlNode item in settlementTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementTypeIDRef = item.Attributes["id"].Name;
                        SettlementTypeEnum ob = SettlementTypeEnum();
                        IDManager.SetID(settlementTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementType = new SettlementTypeEnum(item);
                    }
                }
            }


            XmlNodeList settlementMethodElectionDateNodeList = xmlNode.SelectNodes("settlementMethodElectionDate");

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

            foreach (XmlNode item in settlementMethodElectionDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementMethodElectionDateIDRef = item.Attributes["id"].Name;
                        AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                        IDManager.SetID(settlementMethodElectionDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementMethodElectionDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementMethodElectionDate = new AdjustableOrRelativeDate(item);
                    }
                }
            }


            XmlNodeList settlementMethodElectingPartyReferenceNodeList = xmlNode.SelectNodes("settlementMethodElectingPartyReference");

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

            foreach (XmlNode item in settlementMethodElectingPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementMethodElectingPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(settlementMethodElectingPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementMethodElectingPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementMethodElectingPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList settlementPriceDefaultElectionNodeList = xmlNode.SelectNodes("settlementPriceDefaultElection");

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

            foreach (XmlNode item in settlementPriceDefaultElectionNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        settlementPriceDefaultElectionIDRef = item.Attributes["id"].Name;
                        SettlementPriceDefaultElection ob = SettlementPriceDefaultElection();
                        IDManager.SetID(settlementPriceDefaultElectionIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        settlementPriceDefaultElectionIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        settlementPriceDefaultElection = new SettlementPriceDefaultElection(item);
                    }
                }
            }
        }
        public EquityExerciseValuationSettlement(XmlNode xmlNode)
        {
            XmlNode equityEuropeanExerciseNode = xmlNode.SelectSingleNode("equityEuropeanExercise");

            if (equityEuropeanExerciseNode != null)
            {
                if (equityEuropeanExerciseNode.Attributes["href"] != null || equityEuropeanExerciseNode.Attributes["id"] != null)
                {
                    if (equityEuropeanExerciseNode.Attributes["id"] != null)
                    {
                        equityEuropeanExerciseIDRef_ = equityEuropeanExerciseNode.Attributes["id"].Value;
                        EquityEuropeanExercise ob = new EquityEuropeanExercise(equityEuropeanExerciseNode);
                        IDManager.SetID(equityEuropeanExerciseIDRef_, ob);
                    }
                    else if (equityEuropeanExerciseNode.Attributes["href"] != null)
                    {
                        equityEuropeanExerciseIDRef_ = equityEuropeanExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityEuropeanExercise_ = new EquityEuropeanExercise(equityEuropeanExerciseNode);
                    }
                }
                else
                {
                    equityEuropeanExercise_ = new EquityEuropeanExercise(equityEuropeanExerciseNode);
                }
            }


            XmlNode equityAmericanExerciseNode = xmlNode.SelectSingleNode("equityAmericanExercise");

            if (equityAmericanExerciseNode != null)
            {
                if (equityAmericanExerciseNode.Attributes["href"] != null || equityAmericanExerciseNode.Attributes["id"] != null)
                {
                    if (equityAmericanExerciseNode.Attributes["id"] != null)
                    {
                        equityAmericanExerciseIDRef_ = equityAmericanExerciseNode.Attributes["id"].Value;
                        EquityAmericanExercise ob = new EquityAmericanExercise(equityAmericanExerciseNode);
                        IDManager.SetID(equityAmericanExerciseIDRef_, ob);
                    }
                    else if (equityAmericanExerciseNode.Attributes["href"] != null)
                    {
                        equityAmericanExerciseIDRef_ = equityAmericanExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityAmericanExercise_ = new EquityAmericanExercise(equityAmericanExerciseNode);
                    }
                }
                else
                {
                    equityAmericanExercise_ = new EquityAmericanExercise(equityAmericanExerciseNode);
                }
            }


            XmlNode equityBermudaExerciseNode = xmlNode.SelectSingleNode("equityBermudaExercise");

            if (equityBermudaExerciseNode != null)
            {
                if (equityBermudaExerciseNode.Attributes["href"] != null || equityBermudaExerciseNode.Attributes["id"] != null)
                {
                    if (equityBermudaExerciseNode.Attributes["id"] != null)
                    {
                        equityBermudaExerciseIDRef_ = equityBermudaExerciseNode.Attributes["id"].Value;
                        EquityBermudaExercise ob = new EquityBermudaExercise(equityBermudaExerciseNode);
                        IDManager.SetID(equityBermudaExerciseIDRef_, ob);
                    }
                    else if (equityBermudaExerciseNode.Attributes["href"] != null)
                    {
                        equityBermudaExerciseIDRef_ = equityBermudaExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityBermudaExercise_ = new EquityBermudaExercise(equityBermudaExerciseNode);
                    }
                }
                else
                {
                    equityBermudaExercise_ = new EquityBermudaExercise(equityBermudaExerciseNode);
                }
            }


            XmlNode automaticExerciseNode = xmlNode.SelectSingleNode("automaticExercise");

            if (automaticExerciseNode != null)
            {
                if (automaticExerciseNode.Attributes["href"] != null || automaticExerciseNode.Attributes["id"] != null)
                {
                    if (automaticExerciseNode.Attributes["id"] != null)
                    {
                        automaticExerciseIDRef_ = automaticExerciseNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(automaticExerciseNode);
                        IDManager.SetID(automaticExerciseIDRef_, ob);
                    }
                    else if (automaticExerciseNode.Attributes["href"] != null)
                    {
                        automaticExerciseIDRef_ = automaticExerciseNode.Attributes["href"].Value;
                    }
                    else
                    {
                        automaticExercise_ = new XsdTypeBoolean(automaticExerciseNode);
                    }
                }
                else
                {
                    automaticExercise_ = new XsdTypeBoolean(automaticExerciseNode);
                }
            }


            XmlNode makeWholeProvisionsNode = xmlNode.SelectSingleNode("makeWholeProvisions");

            if (makeWholeProvisionsNode != null)
            {
                if (makeWholeProvisionsNode.Attributes["href"] != null || makeWholeProvisionsNode.Attributes["id"] != null)
                {
                    if (makeWholeProvisionsNode.Attributes["id"] != null)
                    {
                        makeWholeProvisionsIDRef_ = makeWholeProvisionsNode.Attributes["id"].Value;
                        MakeWholeProvisions ob = new MakeWholeProvisions(makeWholeProvisionsNode);
                        IDManager.SetID(makeWholeProvisionsIDRef_, ob);
                    }
                    else if (makeWholeProvisionsNode.Attributes["href"] != null)
                    {
                        makeWholeProvisionsIDRef_ = makeWholeProvisionsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        makeWholeProvisions_ = new MakeWholeProvisions(makeWholeProvisionsNode);
                    }
                }
                else
                {
                    makeWholeProvisions_ = new MakeWholeProvisions(makeWholeProvisionsNode);
                }
            }


            XmlNode prePaymentNode = xmlNode.SelectSingleNode("prePayment");

            if (prePaymentNode != null)
            {
                if (prePaymentNode.Attributes["href"] != null || prePaymentNode.Attributes["id"] != null)
                {
                    if (prePaymentNode.Attributes["id"] != null)
                    {
                        prePaymentIDRef_ = prePaymentNode.Attributes["id"].Value;
                        PrePayment ob = new PrePayment(prePaymentNode);
                        IDManager.SetID(prePaymentIDRef_, ob);
                    }
                    else if (prePaymentNode.Attributes["href"] != null)
                    {
                        prePaymentIDRef_ = prePaymentNode.Attributes["href"].Value;
                    }
                    else
                    {
                        prePayment_ = new PrePayment(prePaymentNode);
                    }
                }
                else
                {
                    prePayment_ = new PrePayment(prePaymentNode);
                }
            }


            XmlNode equityValuationNode = xmlNode.SelectSingleNode("equityValuation");

            if (equityValuationNode != null)
            {
                if (equityValuationNode.Attributes["href"] != null || equityValuationNode.Attributes["id"] != null)
                {
                    if (equityValuationNode.Attributes["id"] != null)
                    {
                        equityValuationIDRef_ = equityValuationNode.Attributes["id"].Value;
                        EquityValuation ob = new EquityValuation(equityValuationNode);
                        IDManager.SetID(equityValuationIDRef_, ob);
                    }
                    else if (equityValuationNode.Attributes["href"] != null)
                    {
                        equityValuationIDRef_ = equityValuationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        equityValuation_ = new EquityValuation(equityValuationNode);
                    }
                }
                else
                {
                    equityValuation_ = new EquityValuation(equityValuationNode);
                }
            }


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


            XmlNode settlementPriceSourceNode = xmlNode.SelectSingleNode("settlementPriceSource");

            if (settlementPriceSourceNode != null)
            {
                if (settlementPriceSourceNode.Attributes["href"] != null || settlementPriceSourceNode.Attributes["id"] != null)
                {
                    if (settlementPriceSourceNode.Attributes["id"] != null)
                    {
                        settlementPriceSourceIDRef_ = settlementPriceSourceNode.Attributes["id"].Value;
                        SettlementPriceSource ob = new SettlementPriceSource(settlementPriceSourceNode);
                        IDManager.SetID(settlementPriceSourceIDRef_, ob);
                    }
                    else if (settlementPriceSourceNode.Attributes["href"] != null)
                    {
                        settlementPriceSourceIDRef_ = settlementPriceSourceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementPriceSource_ = new SettlementPriceSource(settlementPriceSourceNode);
                    }
                }
                else
                {
                    settlementPriceSource_ = new SettlementPriceSource(settlementPriceSourceNode);
                }
            }


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

            if (settlementMethodElectionDateNode != null)
            {
                if (settlementMethodElectionDateNode.Attributes["href"] != null || settlementMethodElectionDateNode.Attributes["id"] != null)
                {
                    if (settlementMethodElectionDateNode.Attributes["id"] != null)
                    {
                        settlementMethodElectionDateIDRef_ = settlementMethodElectionDateNode.Attributes["id"].Value;
                        AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(settlementMethodElectionDateNode);
                        IDManager.SetID(settlementMethodElectionDateIDRef_, ob);
                    }
                    else if (settlementMethodElectionDateNode.Attributes["href"] != null)
                    {
                        settlementMethodElectionDateIDRef_ = settlementMethodElectionDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementMethodElectionDate_ = new AdjustableOrRelativeDate(settlementMethodElectionDateNode);
                    }
                }
                else
                {
                    settlementMethodElectionDate_ = new AdjustableOrRelativeDate(settlementMethodElectionDateNode);
                }
            }


            XmlNode settlementMethodElectingPartyReferenceNode = xmlNode.SelectSingleNode("settlementMethodElectingPartyReference");

            if (settlementMethodElectingPartyReferenceNode != null)
            {
                if (settlementMethodElectingPartyReferenceNode.Attributes["href"] != null || settlementMethodElectingPartyReferenceNode.Attributes["id"] != null)
                {
                    if (settlementMethodElectingPartyReferenceNode.Attributes["id"] != null)
                    {
                        settlementMethodElectingPartyReferenceIDRef_ = settlementMethodElectingPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(settlementMethodElectingPartyReferenceNode);
                        IDManager.SetID(settlementMethodElectingPartyReferenceIDRef_, ob);
                    }
                    else if (settlementMethodElectingPartyReferenceNode.Attributes["href"] != null)
                    {
                        settlementMethodElectingPartyReferenceIDRef_ = settlementMethodElectingPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementMethodElectingPartyReference_ = new PartyReference(settlementMethodElectingPartyReferenceNode);
                    }
                }
                else
                {
                    settlementMethodElectingPartyReference_ = new PartyReference(settlementMethodElectingPartyReferenceNode);
                }
            }


            XmlNode settlementPriceDefaultElectionNode = xmlNode.SelectSingleNode("settlementPriceDefaultElection");

            if (settlementPriceDefaultElectionNode != null)
            {
                if (settlementPriceDefaultElectionNode.Attributes["href"] != null || settlementPriceDefaultElectionNode.Attributes["id"] != null)
                {
                    if (settlementPriceDefaultElectionNode.Attributes["id"] != null)
                    {
                        settlementPriceDefaultElectionIDRef_ = settlementPriceDefaultElectionNode.Attributes["id"].Value;
                        SettlementPriceDefaultElection ob = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode);
                        IDManager.SetID(settlementPriceDefaultElectionIDRef_, ob);
                    }
                    else if (settlementPriceDefaultElectionNode.Attributes["href"] != null)
                    {
                        settlementPriceDefaultElectionIDRef_ = settlementPriceDefaultElectionNode.Attributes["href"].Value;
                    }
                    else
                    {
                        settlementPriceDefaultElection_ = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode);
                    }
                }
                else
                {
                    settlementPriceDefaultElection_ = new SettlementPriceDefaultElection(settlementPriceDefaultElectionNode);
                }
            }
        }
 public EquityExerciseValuationSettlement(XmlNode xmlNode)
 {
     XmlNodeList equityEuropeanExerciseNodeList = xmlNode.SelectNodes("equityEuropeanExercise");
     if (equityEuropeanExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityEuropeanExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityEuropeanExerciseIDRef = item.Attributes["id"].Name;
                 EquityEuropeanExercise ob = EquityEuropeanExercise();
                 IDManager.SetID(equityEuropeanExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityEuropeanExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityEuropeanExercise = new EquityEuropeanExercise(item);
             }
         }
     }
     
 
     XmlNodeList equityAmericanExerciseNodeList = xmlNode.SelectNodes("equityAmericanExercise");
     if (equityAmericanExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityAmericanExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityAmericanExerciseIDRef = item.Attributes["id"].Name;
                 EquityAmericanExercise ob = EquityAmericanExercise();
                 IDManager.SetID(equityAmericanExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityAmericanExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityAmericanExercise = new EquityAmericanExercise(item);
             }
         }
     }
     
 
     XmlNodeList equityBermudaExerciseNodeList = xmlNode.SelectNodes("equityBermudaExercise");
     if (equityBermudaExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityBermudaExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityBermudaExerciseIDRef = item.Attributes["id"].Name;
                 EquityBermudaExercise ob = EquityBermudaExercise();
                 IDManager.SetID(equityBermudaExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityBermudaExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityBermudaExercise = new EquityBermudaExercise(item);
             }
         }
     }
     
 
     XmlNodeList automaticExerciseNodeList = xmlNode.SelectNodes("automaticExercise");
     if (automaticExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in automaticExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 automaticExerciseIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(automaticExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 automaticExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 automaticExercise = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList makeWholeProvisionsNodeList = xmlNode.SelectNodes("makeWholeProvisions");
     if (makeWholeProvisionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in makeWholeProvisionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 makeWholeProvisionsIDRef = item.Attributes["id"].Name;
                 MakeWholeProvisions ob = MakeWholeProvisions();
                 IDManager.SetID(makeWholeProvisionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 makeWholeProvisionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 makeWholeProvisions = new MakeWholeProvisions(item);
             }
         }
     }
     
 
     XmlNodeList prePaymentNodeList = xmlNode.SelectNodes("prePayment");
     if (prePaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in prePaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 prePaymentIDRef = item.Attributes["id"].Name;
                 PrePayment ob = PrePayment();
                 IDManager.SetID(prePaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 prePaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 prePayment = new PrePayment(item);
             }
         }
     }
     
 
     XmlNodeList equityValuationNodeList = xmlNode.SelectNodes("equityValuation");
     if (equityValuationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityValuationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityValuationIDRef = item.Attributes["id"].Name;
                 EquityValuation ob = EquityValuation();
                 IDManager.SetID(equityValuationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityValuationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityValuation = new EquityValuation(item);
             }
         }
     }
     
 
     XmlNodeList settlementDateNodeList = xmlNode.SelectNodes("settlementDate");
     if (settlementDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(settlementDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList settlementCurrencyNodeList = xmlNode.SelectNodes("settlementCurrency");
     if (settlementCurrencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementCurrencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementCurrencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(settlementCurrencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementCurrencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementCurrency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList settlementPriceSourceNodeList = xmlNode.SelectNodes("settlementPriceSource");
     if (settlementPriceSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementPriceSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementPriceSourceIDRef = item.Attributes["id"].Name;
                 SettlementPriceSource ob = SettlementPriceSource();
                 IDManager.SetID(settlementPriceSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementPriceSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementPriceSource = new SettlementPriceSource(item);
             }
         }
     }
     
 
     XmlNodeList settlementTypeNodeList = xmlNode.SelectNodes("settlementType");
     if (settlementTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementTypeIDRef = item.Attributes["id"].Name;
                 SettlementTypeEnum ob = SettlementTypeEnum();
                 IDManager.SetID(settlementTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementType = new SettlementTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList settlementMethodElectionDateNodeList = xmlNode.SelectNodes("settlementMethodElectionDate");
     if (settlementMethodElectionDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementMethodElectionDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementMethodElectionDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(settlementMethodElectionDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementMethodElectionDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementMethodElectionDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList settlementMethodElectingPartyReferenceNodeList = xmlNode.SelectNodes("settlementMethodElectingPartyReference");
     if (settlementMethodElectingPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementMethodElectingPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementMethodElectingPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(settlementMethodElectingPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementMethodElectingPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementMethodElectingPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList settlementPriceDefaultElectionNodeList = xmlNode.SelectNodes("settlementPriceDefaultElection");
     if (settlementPriceDefaultElectionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementPriceDefaultElectionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementPriceDefaultElectionIDRef = item.Attributes["id"].Name;
                 SettlementPriceDefaultElection ob = SettlementPriceDefaultElection();
                 IDManager.SetID(settlementPriceDefaultElectionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementPriceDefaultElectionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementPriceDefaultElection = new SettlementPriceDefaultElection(item);
             }
         }
     }
     
 
 }