public StructuredProductPayoff(XmlNode xmlNode)
 {
     XmlNode baseInformationNode = xmlNode.SelectSingleNode("baseInformation");
     
     if (baseInformationNode != null)
     {
         if (baseInformationNode.Attributes["href"] != null || baseInformationNode.Attributes["id"] != null) 
         {
             if (baseInformationNode.Attributes["id"] != null) 
             {
                 baseInformationIDRef_ = baseInformationNode.Attributes["id"].Value;
                 BaseInformation ob = new BaseInformation(baseInformationNode);
                 IDManager.SetID(baseInformationIDRef_, ob);
             }
             else if (baseInformationNode.Attributes["href"] != null)
             {
                 baseInformationIDRef_ = baseInformationNode.Attributes["href"].Value;
             }
             else
             {
                 baseInformation_ = new BaseInformation(baseInformationNode);
             }
         }
         else
         {
             baseInformation_ = new BaseInformation(baseInformationNode);
         }
     }
     
 
     XmlNode eventScheduleNode = xmlNode.SelectSingleNode("eventSchedule");
     
     if (eventScheduleNode != null)
     {
         if (eventScheduleNode.Attributes["href"] != null || eventScheduleNode.Attributes["id"] != null) 
         {
             if (eventScheduleNode.Attributes["id"] != null) 
             {
                 eventScheduleIDRef_ = eventScheduleNode.Attributes["id"].Value;
                 EventSchedule ob = new EventSchedule(eventScheduleNode);
                 IDManager.SetID(eventScheduleIDRef_, ob);
             }
             else if (eventScheduleNode.Attributes["href"] != null)
             {
                 eventScheduleIDRef_ = eventScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 eventSchedule_ = new EventSchedule(eventScheduleNode);
             }
         }
         else
         {
             eventSchedule_ = new EventSchedule(eventScheduleNode);
         }
     }
     
 
 }
 public StructuredProductPayoff(XmlNode xmlNode)
 {
     XmlNodeList baseInformationNodeList = xmlNode.SelectNodes("baseInformation");
     if (baseInformationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in baseInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 baseInformationIDRef = item.Attributes["id"].Name;
                 BaseInformation ob = BaseInformation();
                 IDManager.SetID(baseInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 baseInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 baseInformation = new BaseInformation(item);
             }
         }
     }
     
 
     XmlNodeList eventScheduleNodeList = xmlNode.SelectNodes("eventSchedule");
     if (eventScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in eventScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 eventScheduleIDRef = item.Attributes["id"].Name;
                 EventSchedule ob = EventSchedule();
                 IDManager.SetID(eventScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 eventScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 eventSchedule = new EventSchedule(item);
             }
         }
     }
     
 
 }
        public StructuredProductPayoff(XmlNode xmlNode)
        {
            XmlNodeList baseInformationNodeList = xmlNode.SelectNodes("baseInformation");

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

            foreach (XmlNode item in baseInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        baseInformationIDRef = item.Attributes["id"].Name;
                        BaseInformation ob = BaseInformation();
                        IDManager.SetID(baseInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        baseInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        baseInformation = new BaseInformation(item);
                    }
                }
            }


            XmlNodeList eventScheduleNodeList = xmlNode.SelectNodes("eventSchedule");

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

            foreach (XmlNode item in eventScheduleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        eventScheduleIDRef = item.Attributes["id"].Name;
                        EventSchedule ob = EventSchedule();
                        IDManager.SetID(eventScheduleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        eventScheduleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        eventSchedule = new EventSchedule(item);
                    }
                }
            }
        }
        public StructuredProductPayoff(XmlNode xmlNode)
        {
            XmlNode baseInformationNode = xmlNode.SelectSingleNode("baseInformation");

            if (baseInformationNode != null)
            {
                if (baseInformationNode.Attributes["href"] != null || baseInformationNode.Attributes["id"] != null)
                {
                    if (baseInformationNode.Attributes["id"] != null)
                    {
                        baseInformationIDRef_ = baseInformationNode.Attributes["id"].Value;
                        BaseInformation ob = new BaseInformation(baseInformationNode);
                        IDManager.SetID(baseInformationIDRef_, ob);
                    }
                    else if (baseInformationNode.Attributes["href"] != null)
                    {
                        baseInformationIDRef_ = baseInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        baseInformation_ = new BaseInformation(baseInformationNode);
                    }
                }
                else
                {
                    baseInformation_ = new BaseInformation(baseInformationNode);
                }
            }


            XmlNode eventScheduleNode = xmlNode.SelectSingleNode("eventSchedule");

            if (eventScheduleNode != null)
            {
                if (eventScheduleNode.Attributes["href"] != null || eventScheduleNode.Attributes["id"] != null)
                {
                    if (eventScheduleNode.Attributes["id"] != null)
                    {
                        eventScheduleIDRef_ = eventScheduleNode.Attributes["id"].Value;
                        EventSchedule ob = new EventSchedule(eventScheduleNode);
                        IDManager.SetID(eventScheduleIDRef_, ob);
                    }
                    else if (eventScheduleNode.Attributes["href"] != null)
                    {
                        eventScheduleIDRef_ = eventScheduleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        eventSchedule_ = new EventSchedule(eventScheduleNode);
                    }
                }
                else
                {
                    eventSchedule_ = new EventSchedule(eventScheduleNode);
                }
            }
        }