public InterestLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList interestLegCalculationPeriodDatesNodeList = xmlNode.SelectNodes("interestLegCalculationPeriodDates");
     if (interestLegCalculationPeriodDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestLegCalculationPeriodDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestLegCalculationPeriodDatesIDRef = item.Attributes["id"].Name;
                 InterestLegCalculationPeriodDates ob = InterestLegCalculationPeriodDates();
                 IDManager.SetID(interestLegCalculationPeriodDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestLegCalculationPeriodDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestLegCalculationPeriodDates = new InterestLegCalculationPeriodDates(item);
             }
         }
     }
     
 
     XmlNodeList notionalNodeList = xmlNode.SelectNodes("notional");
     if (notionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalIDRef = item.Attributes["id"].Name;
                 ReturnSwapNotional ob = ReturnSwapNotional();
                 IDManager.SetID(notionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notional = new ReturnSwapNotional(item);
             }
         }
     }
     
 
     XmlNodeList interestAmountNodeList = xmlNode.SelectNodes("interestAmount");
     if (interestAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestAmountIDRef = item.Attributes["id"].Name;
                 LegAmount ob = LegAmount();
                 IDManager.SetID(interestAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestAmount = new LegAmount(item);
             }
         }
     }
     
 
     XmlNodeList interestCalculationNodeList = xmlNode.SelectNodes("interestCalculation");
     if (interestCalculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestCalculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestCalculationIDRef = item.Attributes["id"].Name;
                 InterestCalculation ob = InterestCalculation();
                 IDManager.SetID(interestCalculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestCalculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestCalculation = new InterestCalculation(item);
             }
         }
     }
     
 
     XmlNodeList stubCalculationPeriodNodeList = xmlNode.SelectNodes("stubCalculationPeriod");
     if (stubCalculationPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stubCalculationPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stubCalculationPeriodIDRef = item.Attributes["id"].Name;
                 StubCalculationPeriod ob = StubCalculationPeriod();
                 IDManager.SetID(stubCalculationPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stubCalculationPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 stubCalculationPeriod = new StubCalculationPeriod(item);
             }
         }
     }
     
 
 }
 public InterestLeg(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode interestLegCalculationPeriodDatesNode = xmlNode.SelectSingleNode("interestLegCalculationPeriodDates");
     
     if (interestLegCalculationPeriodDatesNode != null)
     {
         if (interestLegCalculationPeriodDatesNode.Attributes["href"] != null || interestLegCalculationPeriodDatesNode.Attributes["id"] != null) 
         {
             if (interestLegCalculationPeriodDatesNode.Attributes["id"] != null) 
             {
                 interestLegCalculationPeriodDatesIDRef_ = interestLegCalculationPeriodDatesNode.Attributes["id"].Value;
                 InterestLegCalculationPeriodDates ob = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
                 IDManager.SetID(interestLegCalculationPeriodDatesIDRef_, ob);
             }
             else if (interestLegCalculationPeriodDatesNode.Attributes["href"] != null)
             {
                 interestLegCalculationPeriodDatesIDRef_ = interestLegCalculationPeriodDatesNode.Attributes["href"].Value;
             }
             else
             {
                 interestLegCalculationPeriodDates_ = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
             }
         }
         else
         {
             interestLegCalculationPeriodDates_ = new InterestLegCalculationPeriodDates(interestLegCalculationPeriodDatesNode);
         }
     }
     
 
     XmlNode notionalNode = xmlNode.SelectSingleNode("notional");
     
     if (notionalNode != null)
     {
         if (notionalNode.Attributes["href"] != null || notionalNode.Attributes["id"] != null) 
         {
             if (notionalNode.Attributes["id"] != null) 
             {
                 notionalIDRef_ = notionalNode.Attributes["id"].Value;
                 ReturnSwapNotional ob = new ReturnSwapNotional(notionalNode);
                 IDManager.SetID(notionalIDRef_, ob);
             }
             else if (notionalNode.Attributes["href"] != null)
             {
                 notionalIDRef_ = notionalNode.Attributes["href"].Value;
             }
             else
             {
                 notional_ = new ReturnSwapNotional(notionalNode);
             }
         }
         else
         {
             notional_ = new ReturnSwapNotional(notionalNode);
         }
     }
     
 
     XmlNode interestAmountNode = xmlNode.SelectSingleNode("interestAmount");
     
     if (interestAmountNode != null)
     {
         if (interestAmountNode.Attributes["href"] != null || interestAmountNode.Attributes["id"] != null) 
         {
             if (interestAmountNode.Attributes["id"] != null) 
             {
                 interestAmountIDRef_ = interestAmountNode.Attributes["id"].Value;
                 LegAmount ob = new LegAmount(interestAmountNode);
                 IDManager.SetID(interestAmountIDRef_, ob);
             }
             else if (interestAmountNode.Attributes["href"] != null)
             {
                 interestAmountIDRef_ = interestAmountNode.Attributes["href"].Value;
             }
             else
             {
                 interestAmount_ = new LegAmount(interestAmountNode);
             }
         }
         else
         {
             interestAmount_ = new LegAmount(interestAmountNode);
         }
     }
     
 
     XmlNode interestCalculationNode = xmlNode.SelectSingleNode("interestCalculation");
     
     if (interestCalculationNode != null)
     {
         if (interestCalculationNode.Attributes["href"] != null || interestCalculationNode.Attributes["id"] != null) 
         {
             if (interestCalculationNode.Attributes["id"] != null) 
             {
                 interestCalculationIDRef_ = interestCalculationNode.Attributes["id"].Value;
                 InterestCalculation ob = new InterestCalculation(interestCalculationNode);
                 IDManager.SetID(interestCalculationIDRef_, ob);
             }
             else if (interestCalculationNode.Attributes["href"] != null)
             {
                 interestCalculationIDRef_ = interestCalculationNode.Attributes["href"].Value;
             }
             else
             {
                 interestCalculation_ = new InterestCalculation(interestCalculationNode);
             }
         }
         else
         {
             interestCalculation_ = new InterestCalculation(interestCalculationNode);
         }
     }
     
 
     XmlNode stubCalculationPeriodNode = xmlNode.SelectSingleNode("stubCalculationPeriod");
     
     if (stubCalculationPeriodNode != null)
     {
         if (stubCalculationPeriodNode.Attributes["href"] != null || stubCalculationPeriodNode.Attributes["id"] != null) 
         {
             if (stubCalculationPeriodNode.Attributes["id"] != null) 
             {
                 stubCalculationPeriodIDRef_ = stubCalculationPeriodNode.Attributes["id"].Value;
                 StubCalculationPeriod ob = new StubCalculationPeriod(stubCalculationPeriodNode);
                 IDManager.SetID(stubCalculationPeriodIDRef_, ob);
             }
             else if (stubCalculationPeriodNode.Attributes["href"] != null)
             {
                 stubCalculationPeriodIDRef_ = stubCalculationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 stubCalculationPeriod_ = new StubCalculationPeriod(stubCalculationPeriodNode);
             }
         }
         else
         {
             stubCalculationPeriod_ = new StubCalculationPeriod(stubCalculationPeriodNode);
         }
     }
     
 
 }