public CalculationPeriodAmount(XmlNode xmlNode)
 {
     XmlNode calculationNode = xmlNode.SelectSingleNode("calculation");
     
     if (calculationNode != null)
     {
         if (calculationNode.Attributes["href"] != null || calculationNode.Attributes["id"] != null) 
         {
             if (calculationNode.Attributes["id"] != null) 
             {
                 calculationIDRef_ = calculationNode.Attributes["id"].Value;
                 Calculation ob = new Calculation(calculationNode);
                 IDManager.SetID(calculationIDRef_, ob);
             }
             else if (calculationNode.Attributes["href"] != null)
             {
                 calculationIDRef_ = calculationNode.Attributes["href"].Value;
             }
             else
             {
                 calculation_ = new Calculation(calculationNode);
             }
         }
         else
         {
             calculation_ = new Calculation(calculationNode);
         }
     }
     
 
     XmlNode knownAmountScheduleNode = xmlNode.SelectSingleNode("knownAmountSchedule");
     
     if (knownAmountScheduleNode != null)
     {
         if (knownAmountScheduleNode.Attributes["href"] != null || knownAmountScheduleNode.Attributes["id"] != null) 
         {
             if (knownAmountScheduleNode.Attributes["id"] != null) 
             {
                 knownAmountScheduleIDRef_ = knownAmountScheduleNode.Attributes["id"].Value;
                 AmountSchedule ob = new AmountSchedule(knownAmountScheduleNode);
                 IDManager.SetID(knownAmountScheduleIDRef_, ob);
             }
             else if (knownAmountScheduleNode.Attributes["href"] != null)
             {
                 knownAmountScheduleIDRef_ = knownAmountScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 knownAmountSchedule_ = new AmountSchedule(knownAmountScheduleNode);
             }
         }
         else
         {
             knownAmountSchedule_ = new AmountSchedule(knownAmountScheduleNode);
         }
     }
     
 
 }
 public CalculationPeriodAmount(XmlNode xmlNode)
 {
     XmlNodeList calculationNodeList = xmlNode.SelectNodes("calculation");
     if (calculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationIDRef = item.Attributes["id"].Name;
                 Calculation ob = Calculation();
                 IDManager.SetID(calculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculation = new Calculation(item);
             }
         }
     }
     
 
     XmlNodeList knownAmountScheduleNodeList = xmlNode.SelectNodes("knownAmountSchedule");
     if (knownAmountScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in knownAmountScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 knownAmountScheduleIDRef = item.Attributes["id"].Name;
                 AmountSchedule ob = AmountSchedule();
                 IDManager.SetID(knownAmountScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 knownAmountScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 knownAmountSchedule = new AmountSchedule(item);
             }
         }
     }
     
 
 }