public OffsetPrevailingTime(XmlNode xmlNode)
 {
     XmlNode timeNode = xmlNode.SelectSingleNode("time");
     
     if (timeNode != null)
     {
         if (timeNode.Attributes["href"] != null || timeNode.Attributes["id"] != null) 
         {
             if (timeNode.Attributes["id"] != null) 
             {
                 timeIDRef_ = timeNode.Attributes["id"].Value;
                 PrevailingTime ob = new PrevailingTime(timeNode);
                 IDManager.SetID(timeIDRef_, ob);
             }
             else if (timeNode.Attributes["href"] != null)
             {
                 timeIDRef_ = timeNode.Attributes["href"].Value;
             }
             else
             {
                 time_ = new PrevailingTime(timeNode);
             }
         }
         else
         {
             time_ = new PrevailingTime(timeNode);
         }
     }
     
 
     XmlNode offsetNode = xmlNode.SelectSingleNode("offset");
     
     if (offsetNode != null)
     {
         if (offsetNode.Attributes["href"] != null || offsetNode.Attributes["id"] != null) 
         {
             if (offsetNode.Attributes["id"] != null) 
             {
                 offsetIDRef_ = offsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(offsetNode);
                 IDManager.SetID(offsetIDRef_, ob);
             }
             else if (offsetNode.Attributes["href"] != null)
             {
                 offsetIDRef_ = offsetNode.Attributes["href"].Value;
             }
             else
             {
                 offset_ = new Offset(offsetNode);
             }
         }
         else
         {
             offset_ = new Offset(offsetNode);
         }
     }
     
 
 }
 public GracePeriodExtension(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 gracePeriodNodeList = xmlNode.SelectNodes("gracePeriod");
     if (gracePeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in gracePeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 gracePeriodIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(gracePeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 gracePeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 gracePeriod = new Offset(item);
             }
         }
     }
     
 
 }
 public GracePeriodExtension(XmlNode xmlNode)
 {
     XmlNode applicableNode = xmlNode.SelectSingleNode("applicable");
     
     if (applicableNode != null)
     {
         if (applicableNode.Attributes["href"] != null || applicableNode.Attributes["id"] != null) 
         {
             if (applicableNode.Attributes["id"] != null) 
             {
                 applicableIDRef_ = applicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(applicableNode);
                 IDManager.SetID(applicableIDRef_, ob);
             }
             else if (applicableNode.Attributes["href"] != null)
             {
                 applicableIDRef_ = applicableNode.Attributes["href"].Value;
             }
             else
             {
                 applicable_ = new XsdTypeBoolean(applicableNode);
             }
         }
         else
         {
             applicable_ = new XsdTypeBoolean(applicableNode);
         }
     }
     
 
     XmlNode gracePeriodNode = xmlNode.SelectSingleNode("gracePeriod");
     
     if (gracePeriodNode != null)
     {
         if (gracePeriodNode.Attributes["href"] != null || gracePeriodNode.Attributes["id"] != null) 
         {
             if (gracePeriodNode.Attributes["id"] != null) 
             {
                 gracePeriodIDRef_ = gracePeriodNode.Attributes["id"].Value;
                 Offset ob = new Offset(gracePeriodNode);
                 IDManager.SetID(gracePeriodIDRef_, ob);
             }
             else if (gracePeriodNode.Attributes["href"] != null)
             {
                 gracePeriodIDRef_ = gracePeriodNode.Attributes["href"].Value;
             }
             else
             {
                 gracePeriod_ = new Offset(gracePeriodNode);
             }
         }
         else
         {
             gracePeriod_ = new Offset(gracePeriodNode);
         }
     }
     
 
 }
 public OffsetPrevailingTime(XmlNode xmlNode)
 {
     XmlNodeList timeNodeList = xmlNode.SelectNodes("time");
     if (timeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in timeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 timeIDRef = item.Attributes["id"].Name;
                 PrevailingTime ob = PrevailingTime();
                 IDManager.SetID(timeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 timeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 time = new PrevailingTime(item);
             }
         }
     }
     
 
     XmlNodeList offsetNodeList = xmlNode.SelectNodes("offset");
     if (offsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in offsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 offsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(offsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 offsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 offset = new Offset(item);
             }
         }
     }
     
 
 }
 public PaymentDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesReferenceNodeList = xmlNode.SelectNodes("resetDatesReference");
     if (resetDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesReferenceIDRef = item.Attributes["id"].Name;
                 ResetDatesReference ob = ResetDatesReference();
                 IDManager.SetID(resetDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDatesReference = new ResetDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList valuationDatesReferenceNodeList = xmlNode.SelectNodes("valuationDatesReference");
     if (valuationDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationDatesReferenceIDRef = item.Attributes["id"].Name;
                 ValuationDatesReference ob = ValuationDatesReference();
                 IDManager.SetID(valuationDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationDatesReference = new ValuationDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList paymentFrequencyNodeList = xmlNode.SelectNodes("paymentFrequency");
     if (paymentFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef = item.Attributes["id"].Name;
                 Frequency ob = Frequency();
                 IDManager.SetID(paymentFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentFrequency = new Frequency(item);
             }
         }
     }
     
 
     XmlNodeList firstPaymentDateNodeList = xmlNode.SelectNodes("firstPaymentDate");
     if (firstPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(firstPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstPaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList lastRegularPaymentDateNodeList = xmlNode.SelectNodes("lastRegularPaymentDate");
     if (lastRegularPaymentDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in lastRegularPaymentDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 lastRegularPaymentDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(lastRegularPaymentDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 lastRegularPaymentDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 lastRegularPaymentDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList payRelativeToNodeList = xmlNode.SelectNodes("payRelativeTo");
     if (payRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in payRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 payRelativeToIDRef = item.Attributes["id"].Name;
                 PayRelativeToEnum ob = PayRelativeToEnum();
                 IDManager.SetID(payRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 payRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payRelativeTo = new PayRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList paymentDaysOffsetNodeList = xmlNode.SelectNodes("paymentDaysOffset");
     if (paymentDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDaysOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(paymentDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDaysOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList paymentDatesAdjustmentsNodeList = xmlNode.SelectNodes("paymentDatesAdjustments");
     if (paymentDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(paymentDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNodeList calculationPeriodDatesReferenceNodeList = xmlNode.SelectNodes("calculationPeriodDatesReference");
     if (calculationPeriodDatesReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodDatesReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodDatesReference ob = CalculationPeriodDatesReference();
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodDatesReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodDatesReference = new CalculationPeriodDatesReference(item);
             }
         }
     }
     
 
     XmlNodeList resetRelativeToNodeList = xmlNode.SelectNodes("resetRelativeTo");
     if (resetRelativeToNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetRelativeToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef = item.Attributes["id"].Name;
                 ResetRelativeToEnum ob = ResetRelativeToEnum();
                 IDManager.SetID(resetRelativeToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetRelativeToIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetRelativeTo = new ResetRelativeToEnum(item);
             }
         }
     }
     
 
     XmlNodeList initialFixingDateNodeList = xmlNode.SelectNodes("initialFixingDate");
     if (initialFixingDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialFixingDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(initialFixingDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialFixingDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialFixingDate = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList fixingDatesNodeList = xmlNode.SelectNodes("fixingDates");
     if (fixingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fixingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fixingDatesIDRef = item.Attributes["id"].Name;
                 RelativeDateOffset ob = RelativeDateOffset();
                 IDManager.SetID(fixingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fixingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fixingDates = new RelativeDateOffset(item);
             }
         }
     }
     
 
     XmlNodeList rateCutOffDaysOffsetNodeList = xmlNode.SelectNodes("rateCutOffDaysOffset");
     if (rateCutOffDaysOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in rateCutOffDaysOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(rateCutOffDaysOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 rateCutOffDaysOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rateCutOffDaysOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList resetFrequencyNodeList = xmlNode.SelectNodes("resetFrequency");
     if (resetFrequencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetFrequencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef = item.Attributes["id"].Name;
                 ResetFrequency ob = ResetFrequency();
                 IDManager.SetID(resetFrequencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetFrequencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetFrequency = new ResetFrequency(item);
             }
         }
     }
     
 
     XmlNodeList resetDatesAdjustmentsNodeList = xmlNode.SelectNodes("resetDatesAdjustments");
     if (resetDatesAdjustmentsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in resetDatesAdjustmentsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["id"].Name;
                 BusinessDayAdjustments ob = BusinessDayAdjustments();
                 IDManager.SetID(resetDatesAdjustmentsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 resetDatesAdjustmentsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 resetDatesAdjustments = new BusinessDayAdjustments(item);
             }
         }
     }
     
 
 }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList commodityBaseNodeList = xmlNode.SelectNodes("commodityBase");
     if (commodityBaseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityBaseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityBaseIDRef = item.Attributes["id"].Name;
                 CommodityBase ob = CommodityBase();
                 IDManager.SetID(commodityBaseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityBaseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityBase = new CommodityBase(item);
             }
         }
     }
     
 
     XmlNodeList commodityDetailsNodeList = xmlNode.SelectNodes("commodityDetails");
     if (commodityDetailsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityDetailsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef = item.Attributes["id"].Name;
                 CommodityDetails ob = CommodityDetails();
                 IDManager.SetID(commodityDetailsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityDetailsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityDetails = new CommodityDetails(item);
             }
         }
     }
     
 
     XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");
     if (unitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unitIDRef = item.Attributes["id"].Name;
                 QuantityUnit ob = QuantityUnit();
                 IDManager.SetID(unitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unit = new QuantityUnit(item);
             }
         }
     }
     
 
     XmlNodeList currencyNodeList = xmlNode.SelectNodes("currency");
     if (currencyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in currencyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 currencyIDRef = item.Attributes["id"].Name;
                 Currency ob = Currency();
                 IDManager.SetID(currencyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 currencyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 currency = new Currency(item);
             }
         }
     }
     
 
     XmlNodeList exchangeIdNodeList = xmlNode.SelectNodes("exchangeId");
     if (exchangeIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeIdIDRef = item.Attributes["id"].Name;
                 ExchangeId ob = ExchangeId();
                 IDManager.SetID(exchangeIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeId = new ExchangeId(item);
             }
         }
     }
     
 
     XmlNodeList publicationNodeList = xmlNode.SelectNodes("publication");
     if (publicationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in publicationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 publicationIDRef = item.Attributes["id"].Name;
                 CommodityInformationSource ob = CommodityInformationSource();
                 IDManager.SetID(publicationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 publicationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 publication = new CommodityInformationSource(item);
             }
         }
     }
     
 
     XmlNodeList specifiedPriceNodeList = xmlNode.SelectNodes("specifiedPrice");
     if (specifiedPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in specifiedPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef = item.Attributes["id"].Name;
                 SpecifiedPriceEnum ob = SpecifiedPriceEnum();
                 IDManager.SetID(specifiedPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 specifiedPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 specifiedPrice = new SpecifiedPriceEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDatesNodeList = xmlNode.SelectNodes("deliveryDates");
     if (deliveryDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef = item.Attributes["id"].Name;
                 DeliveryDatesEnum ob = DeliveryDatesEnum();
                 IDManager.SetID(deliveryDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDates = new DeliveryDatesEnum(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateNodeList = xmlNode.SelectNodes("deliveryDate");
     if (deliveryDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(deliveryDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDate = new AdjustableDate(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateYearMonthNodeList = xmlNode.SelectNodes("deliveryDateYearMonth");
     if (deliveryDateYearMonthNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateYearMonthNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef = item.Attributes["id"].Name;
                 XsdTypeGYearMonth ob = XsdTypeGYearMonth();
                 IDManager.SetID(deliveryDateYearMonthIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateYearMonthIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDateYearMonth = new XsdTypeGYearMonth(item);
             }
         }
     }
     
 
     XmlNodeList deliveryDateRollConventionNodeList = xmlNode.SelectNodes("deliveryDateRollConvention");
     if (deliveryDateRollConventionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in deliveryDateRollConventionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(deliveryDateRollConventionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 deliveryDateRollConventionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 deliveryDateRollConvention = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList multiplierNodeList = xmlNode.SelectNodes("multiplier");
     if (multiplierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in multiplierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 multiplierIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(multiplierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 multiplierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 multiplier = new PositiveDecimal(item);
             }
         }
     }
     
 
 }
 public InflationRateCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList inflationLagNodeList = xmlNode.SelectNodes("inflationLag");
     if (inflationLagNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in inflationLagNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 inflationLagIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(inflationLagIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 inflationLagIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 inflationLag = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList indexSourceNodeList = xmlNode.SelectNodes("indexSource");
     if (indexSourceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexSourceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexSourceIDRef = item.Attributes["id"].Name;
                 RateSourcePage ob = RateSourcePage();
                 IDManager.SetID(indexSourceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexSourceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 indexSource = new RateSourcePage(item);
             }
         }
     }
     
 
     XmlNodeList mainPublicationNodeList = xmlNode.SelectNodes("mainPublication");
     if (mainPublicationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mainPublicationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mainPublicationIDRef = item.Attributes["id"].Name;
                 MainPublication ob = MainPublication();
                 IDManager.SetID(mainPublicationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mainPublicationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mainPublication = new MainPublication(item);
             }
         }
     }
     
 
     XmlNodeList interpolationMethodNodeList = xmlNode.SelectNodes("interpolationMethod");
     if (interpolationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interpolationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interpolationMethodIDRef = item.Attributes["id"].Name;
                 InterpolationMethod ob = InterpolationMethod();
                 IDManager.SetID(interpolationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interpolationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interpolationMethod = new InterpolationMethod(item);
             }
         }
     }
     
 
     XmlNodeList initialIndexLevelNodeList = xmlNode.SelectNodes("initialIndexLevel");
     if (initialIndexLevelNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialIndexLevelNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialIndexLevelIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(initialIndexLevelIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialIndexLevelIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialIndexLevel = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fallbackBondApplicableNodeList = xmlNode.SelectNodes("fallbackBondApplicable");
     if (fallbackBondApplicableNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fallbackBondApplicableNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fallbackBondApplicableIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fallbackBondApplicableIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fallbackBondApplicableIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fallbackBondApplicable = new XsdTypeBoolean(item);
             }
         }
     }
     
 
 }
 public ResetDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetRelativeToNode = xmlNode.SelectSingleNode("resetRelativeTo");
     
     if (resetRelativeToNode != null)
     {
         if (resetRelativeToNode.Attributes["href"] != null || resetRelativeToNode.Attributes["id"] != null) 
         {
             if (resetRelativeToNode.Attributes["id"] != null) 
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["id"].Value;
                 ResetRelativeToEnum ob = new ResetRelativeToEnum(resetRelativeToNode);
                 IDManager.SetID(resetRelativeToIDRef_, ob);
             }
             else if (resetRelativeToNode.Attributes["href"] != null)
             {
                 resetRelativeToIDRef_ = resetRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
             }
         }
         else
         {
             resetRelativeTo_ = new ResetRelativeToEnum(resetRelativeToNode);
         }
     }
     
 
     XmlNode initialFixingDateNode = xmlNode.SelectSingleNode("initialFixingDate");
     
     if (initialFixingDateNode != null)
     {
         if (initialFixingDateNode.Attributes["href"] != null || initialFixingDateNode.Attributes["id"] != null) 
         {
             if (initialFixingDateNode.Attributes["id"] != null) 
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(initialFixingDateNode);
                 IDManager.SetID(initialFixingDateIDRef_, ob);
             }
             else if (initialFixingDateNode.Attributes["href"] != null)
             {
                 initialFixingDateIDRef_ = initialFixingDateNode.Attributes["href"].Value;
             }
             else
             {
                 initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
             }
         }
         else
         {
             initialFixingDate_ = new RelativeDateOffset(initialFixingDateNode);
         }
     }
     
 
     XmlNode fixingDatesNode = xmlNode.SelectSingleNode("fixingDates");
     
     if (fixingDatesNode != null)
     {
         if (fixingDatesNode.Attributes["href"] != null || fixingDatesNode.Attributes["id"] != null) 
         {
             if (fixingDatesNode.Attributes["id"] != null) 
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["id"].Value;
                 RelativeDateOffset ob = new RelativeDateOffset(fixingDatesNode);
                 IDManager.SetID(fixingDatesIDRef_, ob);
             }
             else if (fixingDatesNode.Attributes["href"] != null)
             {
                 fixingDatesIDRef_ = fixingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 fixingDates_ = new RelativeDateOffset(fixingDatesNode);
             }
         }
         else
         {
             fixingDates_ = new RelativeDateOffset(fixingDatesNode);
         }
     }
     
 
     XmlNode rateCutOffDaysOffsetNode = xmlNode.SelectSingleNode("rateCutOffDaysOffset");
     
     if (rateCutOffDaysOffsetNode != null)
     {
         if (rateCutOffDaysOffsetNode.Attributes["href"] != null || rateCutOffDaysOffsetNode.Attributes["id"] != null) 
         {
             if (rateCutOffDaysOffsetNode.Attributes["id"] != null) 
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(rateCutOffDaysOffsetNode);
                 IDManager.SetID(rateCutOffDaysOffsetIDRef_, ob);
             }
             else if (rateCutOffDaysOffsetNode.Attributes["href"] != null)
             {
                 rateCutOffDaysOffsetIDRef_ = rateCutOffDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
             }
         }
         else
         {
             rateCutOffDaysOffset_ = new Offset(rateCutOffDaysOffsetNode);
         }
     }
     
 
     XmlNode resetFrequencyNode = xmlNode.SelectSingleNode("resetFrequency");
     
     if (resetFrequencyNode != null)
     {
         if (resetFrequencyNode.Attributes["href"] != null || resetFrequencyNode.Attributes["id"] != null) 
         {
             if (resetFrequencyNode.Attributes["id"] != null) 
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["id"].Value;
                 ResetFrequency ob = new ResetFrequency(resetFrequencyNode);
                 IDManager.SetID(resetFrequencyIDRef_, ob);
             }
             else if (resetFrequencyNode.Attributes["href"] != null)
             {
                 resetFrequencyIDRef_ = resetFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 resetFrequency_ = new ResetFrequency(resetFrequencyNode);
             }
         }
         else
         {
             resetFrequency_ = new ResetFrequency(resetFrequencyNode);
         }
     }
     
 
     XmlNode resetDatesAdjustmentsNode = xmlNode.SelectSingleNode("resetDatesAdjustments");
     
     if (resetDatesAdjustmentsNode != null)
     {
         if (resetDatesAdjustmentsNode.Attributes["href"] != null || resetDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (resetDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
                 IDManager.SetID(resetDatesAdjustmentsIDRef_, ob);
             }
             else if (resetDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 resetDatesAdjustmentsIDRef_ = resetDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
             }
         }
         else
         {
             resetDatesAdjustments_ = new BusinessDayAdjustments(resetDatesAdjustmentsNode);
         }
     }
     
 
 }
 public Commodity(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode commodityBaseNode = xmlNode.SelectSingleNode("commodityBase");
     
     if (commodityBaseNode != null)
     {
         if (commodityBaseNode.Attributes["href"] != null || commodityBaseNode.Attributes["id"] != null) 
         {
             if (commodityBaseNode.Attributes["id"] != null) 
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["id"].Value;
                 CommodityBase ob = new CommodityBase(commodityBaseNode);
                 IDManager.SetID(commodityBaseIDRef_, ob);
             }
             else if (commodityBaseNode.Attributes["href"] != null)
             {
                 commodityBaseIDRef_ = commodityBaseNode.Attributes["href"].Value;
             }
             else
             {
                 commodityBase_ = new CommodityBase(commodityBaseNode);
             }
         }
         else
         {
             commodityBase_ = new CommodityBase(commodityBaseNode);
         }
     }
     
 
     XmlNode commodityDetailsNode = xmlNode.SelectSingleNode("commodityDetails");
     
     if (commodityDetailsNode != null)
     {
         if (commodityDetailsNode.Attributes["href"] != null || commodityDetailsNode.Attributes["id"] != null) 
         {
             if (commodityDetailsNode.Attributes["id"] != null) 
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["id"].Value;
                 CommodityDetails ob = new CommodityDetails(commodityDetailsNode);
                 IDManager.SetID(commodityDetailsIDRef_, ob);
             }
             else if (commodityDetailsNode.Attributes["href"] != null)
             {
                 commodityDetailsIDRef_ = commodityDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 commodityDetails_ = new CommodityDetails(commodityDetailsNode);
             }
         }
         else
         {
             commodityDetails_ = new CommodityDetails(commodityDetailsNode);
         }
     }
     
 
     XmlNode unitNode = xmlNode.SelectSingleNode("unit");
     
     if (unitNode != null)
     {
         if (unitNode.Attributes["href"] != null || unitNode.Attributes["id"] != null) 
         {
             if (unitNode.Attributes["id"] != null) 
             {
                 unitIDRef_ = unitNode.Attributes["id"].Value;
                 QuantityUnit ob = new QuantityUnit(unitNode);
                 IDManager.SetID(unitIDRef_, ob);
             }
             else if (unitNode.Attributes["href"] != null)
             {
                 unitIDRef_ = unitNode.Attributes["href"].Value;
             }
             else
             {
                 unit_ = new QuantityUnit(unitNode);
             }
         }
         else
         {
             unit_ = new QuantityUnit(unitNode);
         }
     }
     
 
     XmlNode currencyNode = xmlNode.SelectSingleNode("currency");
     
     if (currencyNode != null)
     {
         if (currencyNode.Attributes["href"] != null || currencyNode.Attributes["id"] != null) 
         {
             if (currencyNode.Attributes["id"] != null) 
             {
                 currencyIDRef_ = currencyNode.Attributes["id"].Value;
                 Currency ob = new Currency(currencyNode);
                 IDManager.SetID(currencyIDRef_, ob);
             }
             else if (currencyNode.Attributes["href"] != null)
             {
                 currencyIDRef_ = currencyNode.Attributes["href"].Value;
             }
             else
             {
                 currency_ = new Currency(currencyNode);
             }
         }
         else
         {
             currency_ = new Currency(currencyNode);
         }
     }
     
 
     XmlNode exchangeIdNode = xmlNode.SelectSingleNode("exchangeId");
     
     if (exchangeIdNode != null)
     {
         if (exchangeIdNode.Attributes["href"] != null || exchangeIdNode.Attributes["id"] != null) 
         {
             if (exchangeIdNode.Attributes["id"] != null) 
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["id"].Value;
                 ExchangeId ob = new ExchangeId(exchangeIdNode);
                 IDManager.SetID(exchangeIdIDRef_, ob);
             }
             else if (exchangeIdNode.Attributes["href"] != null)
             {
                 exchangeIdIDRef_ = exchangeIdNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeId_ = new ExchangeId(exchangeIdNode);
             }
         }
         else
         {
             exchangeId_ = new ExchangeId(exchangeIdNode);
         }
     }
     
 
     XmlNode publicationNode = xmlNode.SelectSingleNode("publication");
     
     if (publicationNode != null)
     {
         if (publicationNode.Attributes["href"] != null || publicationNode.Attributes["id"] != null) 
         {
             if (publicationNode.Attributes["id"] != null) 
             {
                 publicationIDRef_ = publicationNode.Attributes["id"].Value;
                 CommodityInformationSource ob = new CommodityInformationSource(publicationNode);
                 IDManager.SetID(publicationIDRef_, ob);
             }
             else if (publicationNode.Attributes["href"] != null)
             {
                 publicationIDRef_ = publicationNode.Attributes["href"].Value;
             }
             else
             {
                 publication_ = new CommodityInformationSource(publicationNode);
             }
         }
         else
         {
             publication_ = new CommodityInformationSource(publicationNode);
         }
     }
     
 
     XmlNode specifiedPriceNode = xmlNode.SelectSingleNode("specifiedPrice");
     
     if (specifiedPriceNode != null)
     {
         if (specifiedPriceNode.Attributes["href"] != null || specifiedPriceNode.Attributes["id"] != null) 
         {
             if (specifiedPriceNode.Attributes["id"] != null) 
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["id"].Value;
                 SpecifiedPriceEnum ob = new SpecifiedPriceEnum(specifiedPriceNode);
                 IDManager.SetID(specifiedPriceIDRef_, ob);
             }
             else if (specifiedPriceNode.Attributes["href"] != null)
             {
                 specifiedPriceIDRef_ = specifiedPriceNode.Attributes["href"].Value;
             }
             else
             {
                 specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
             }
         }
         else
         {
             specifiedPrice_ = new SpecifiedPriceEnum(specifiedPriceNode);
         }
     }
     
 
     XmlNode deliveryDatesNode = xmlNode.SelectSingleNode("deliveryDates");
     
     if (deliveryDatesNode != null)
     {
         if (deliveryDatesNode.Attributes["href"] != null || deliveryDatesNode.Attributes["id"] != null) 
         {
             if (deliveryDatesNode.Attributes["id"] != null) 
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["id"].Value;
                 DeliveryDatesEnum ob = new DeliveryDatesEnum(deliveryDatesNode);
                 IDManager.SetID(deliveryDatesIDRef_, ob);
             }
             else if (deliveryDatesNode.Attributes["href"] != null)
             {
                 deliveryDatesIDRef_ = deliveryDatesNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
             }
         }
         else
         {
             deliveryDates_ = new DeliveryDatesEnum(deliveryDatesNode);
         }
     }
     
 
     XmlNode deliveryDateNode = xmlNode.SelectSingleNode("deliveryDate");
     
     if (deliveryDateNode != null)
     {
         if (deliveryDateNode.Attributes["href"] != null || deliveryDateNode.Attributes["id"] != null) 
         {
             if (deliveryDateNode.Attributes["id"] != null) 
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(deliveryDateNode);
                 IDManager.SetID(deliveryDateIDRef_, ob);
             }
             else if (deliveryDateNode.Attributes["href"] != null)
             {
                 deliveryDateIDRef_ = deliveryDateNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDate_ = new AdjustableDate(deliveryDateNode);
             }
         }
         else
         {
             deliveryDate_ = new AdjustableDate(deliveryDateNode);
         }
     }
     
 
     XmlNode deliveryDateYearMonthNode = xmlNode.SelectSingleNode("deliveryDateYearMonth");
     
     if (deliveryDateYearMonthNode != null)
     {
         if (deliveryDateYearMonthNode.Attributes["href"] != null || deliveryDateYearMonthNode.Attributes["id"] != null) 
         {
             if (deliveryDateYearMonthNode.Attributes["id"] != null) 
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["id"].Value;
                 XsdTypeGYearMonth ob = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
                 IDManager.SetID(deliveryDateYearMonthIDRef_, ob);
             }
             else if (deliveryDateYearMonthNode.Attributes["href"] != null)
             {
                 deliveryDateYearMonthIDRef_ = deliveryDateYearMonthNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
             }
         }
         else
         {
             deliveryDateYearMonth_ = new XsdTypeGYearMonth(deliveryDateYearMonthNode);
         }
     }
     
 
     XmlNode deliveryDateRollConventionNode = xmlNode.SelectSingleNode("deliveryDateRollConvention");
     
     if (deliveryDateRollConventionNode != null)
     {
         if (deliveryDateRollConventionNode.Attributes["href"] != null || deliveryDateRollConventionNode.Attributes["id"] != null) 
         {
             if (deliveryDateRollConventionNode.Attributes["id"] != null) 
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["id"].Value;
                 Offset ob = new Offset(deliveryDateRollConventionNode);
                 IDManager.SetID(deliveryDateRollConventionIDRef_, ob);
             }
             else if (deliveryDateRollConventionNode.Attributes["href"] != null)
             {
                 deliveryDateRollConventionIDRef_ = deliveryDateRollConventionNode.Attributes["href"].Value;
             }
             else
             {
                 deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
             }
         }
         else
         {
             deliveryDateRollConvention_ = new Offset(deliveryDateRollConventionNode);
         }
     }
     
 
     XmlNode multiplierNode = xmlNode.SelectSingleNode("multiplier");
     
     if (multiplierNode != null)
     {
         if (multiplierNode.Attributes["href"] != null || multiplierNode.Attributes["id"] != null) 
         {
             if (multiplierNode.Attributes["id"] != null) 
             {
                 multiplierIDRef_ = multiplierNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(multiplierNode);
                 IDManager.SetID(multiplierIDRef_, ob);
             }
             else if (multiplierNode.Attributes["href"] != null)
             {
                 multiplierIDRef_ = multiplierNode.Attributes["href"].Value;
             }
             else
             {
                 multiplier_ = new PositiveDecimal(multiplierNode);
             }
         }
         else
         {
             multiplier_ = new PositiveDecimal(multiplierNode);
         }
     }
     
 
 }
 public InflationRateCalculation(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode inflationLagNode = xmlNode.SelectSingleNode("inflationLag");
     
     if (inflationLagNode != null)
     {
         if (inflationLagNode.Attributes["href"] != null || inflationLagNode.Attributes["id"] != null) 
         {
             if (inflationLagNode.Attributes["id"] != null) 
             {
                 inflationLagIDRef_ = inflationLagNode.Attributes["id"].Value;
                 Offset ob = new Offset(inflationLagNode);
                 IDManager.SetID(inflationLagIDRef_, ob);
             }
             else if (inflationLagNode.Attributes["href"] != null)
             {
                 inflationLagIDRef_ = inflationLagNode.Attributes["href"].Value;
             }
             else
             {
                 inflationLag_ = new Offset(inflationLagNode);
             }
         }
         else
         {
             inflationLag_ = new Offset(inflationLagNode);
         }
     }
     
 
     XmlNode indexSourceNode = xmlNode.SelectSingleNode("indexSource");
     
     if (indexSourceNode != null)
     {
         if (indexSourceNode.Attributes["href"] != null || indexSourceNode.Attributes["id"] != null) 
         {
             if (indexSourceNode.Attributes["id"] != null) 
             {
                 indexSourceIDRef_ = indexSourceNode.Attributes["id"].Value;
                 RateSourcePage ob = new RateSourcePage(indexSourceNode);
                 IDManager.SetID(indexSourceIDRef_, ob);
             }
             else if (indexSourceNode.Attributes["href"] != null)
             {
                 indexSourceIDRef_ = indexSourceNode.Attributes["href"].Value;
             }
             else
             {
                 indexSource_ = new RateSourcePage(indexSourceNode);
             }
         }
         else
         {
             indexSource_ = new RateSourcePage(indexSourceNode);
         }
     }
     
 
     XmlNode mainPublicationNode = xmlNode.SelectSingleNode("mainPublication");
     
     if (mainPublicationNode != null)
     {
         if (mainPublicationNode.Attributes["href"] != null || mainPublicationNode.Attributes["id"] != null) 
         {
             if (mainPublicationNode.Attributes["id"] != null) 
             {
                 mainPublicationIDRef_ = mainPublicationNode.Attributes["id"].Value;
                 MainPublication ob = new MainPublication(mainPublicationNode);
                 IDManager.SetID(mainPublicationIDRef_, ob);
             }
             else if (mainPublicationNode.Attributes["href"] != null)
             {
                 mainPublicationIDRef_ = mainPublicationNode.Attributes["href"].Value;
             }
             else
             {
                 mainPublication_ = new MainPublication(mainPublicationNode);
             }
         }
         else
         {
             mainPublication_ = new MainPublication(mainPublicationNode);
         }
     }
     
 
     XmlNode interpolationMethodNode = xmlNode.SelectSingleNode("interpolationMethod");
     
     if (interpolationMethodNode != null)
     {
         if (interpolationMethodNode.Attributes["href"] != null || interpolationMethodNode.Attributes["id"] != null) 
         {
             if (interpolationMethodNode.Attributes["id"] != null) 
             {
                 interpolationMethodIDRef_ = interpolationMethodNode.Attributes["id"].Value;
                 InterpolationMethod ob = new InterpolationMethod(interpolationMethodNode);
                 IDManager.SetID(interpolationMethodIDRef_, ob);
             }
             else if (interpolationMethodNode.Attributes["href"] != null)
             {
                 interpolationMethodIDRef_ = interpolationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
             }
         }
         else
         {
             interpolationMethod_ = new InterpolationMethod(interpolationMethodNode);
         }
     }
     
 
     XmlNode initialIndexLevelNode = xmlNode.SelectSingleNode("initialIndexLevel");
     
     if (initialIndexLevelNode != null)
     {
         if (initialIndexLevelNode.Attributes["href"] != null || initialIndexLevelNode.Attributes["id"] != null) 
         {
             if (initialIndexLevelNode.Attributes["id"] != null) 
             {
                 initialIndexLevelIDRef_ = initialIndexLevelNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(initialIndexLevelNode);
                 IDManager.SetID(initialIndexLevelIDRef_, ob);
             }
             else if (initialIndexLevelNode.Attributes["href"] != null)
             {
                 initialIndexLevelIDRef_ = initialIndexLevelNode.Attributes["href"].Value;
             }
             else
             {
                 initialIndexLevel_ = new XsdTypeDecimal(initialIndexLevelNode);
             }
         }
         else
         {
             initialIndexLevel_ = new XsdTypeDecimal(initialIndexLevelNode);
         }
     }
     
 
     XmlNode fallbackBondApplicableNode = xmlNode.SelectSingleNode("fallbackBondApplicable");
     
     if (fallbackBondApplicableNode != null)
     {
         if (fallbackBondApplicableNode.Attributes["href"] != null || fallbackBondApplicableNode.Attributes["id"] != null) 
         {
             if (fallbackBondApplicableNode.Attributes["id"] != null) 
             {
                 fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fallbackBondApplicableNode);
                 IDManager.SetID(fallbackBondApplicableIDRef_, ob);
             }
             else if (fallbackBondApplicableNode.Attributes["href"] != null)
             {
                 fallbackBondApplicableIDRef_ = fallbackBondApplicableNode.Attributes["href"].Value;
             }
             else
             {
                 fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode);
             }
         }
         else
         {
             fallbackBondApplicable_ = new XsdTypeBoolean(fallbackBondApplicableNode);
         }
     }
     
 
 }
 public DividendPaymentDate(XmlNode xmlNode)
 {
     XmlNode dividendDateReferenceNode = xmlNode.SelectSingleNode("dividendDateReference");
     
     if (dividendDateReferenceNode != null)
     {
         if (dividendDateReferenceNode.Attributes["href"] != null || dividendDateReferenceNode.Attributes["id"] != null) 
         {
             if (dividendDateReferenceNode.Attributes["id"] != null) 
             {
                 dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["id"].Value;
                 DividendDateReferenceEnum ob = new DividendDateReferenceEnum(dividendDateReferenceNode);
                 IDManager.SetID(dividendDateReferenceIDRef_, ob);
             }
             else if (dividendDateReferenceNode.Attributes["href"] != null)
             {
                 dividendDateReferenceIDRef_ = dividendDateReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
             }
         }
         else
         {
             dividendDateReference_ = new DividendDateReferenceEnum(dividendDateReferenceNode);
         }
     }
     
 
     XmlNode paymentDateOffsetNode = xmlNode.SelectSingleNode("paymentDateOffset");
     
     if (paymentDateOffsetNode != null)
     {
         if (paymentDateOffsetNode.Attributes["href"] != null || paymentDateOffsetNode.Attributes["id"] != null) 
         {
             if (paymentDateOffsetNode.Attributes["id"] != null) 
             {
                 paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(paymentDateOffsetNode);
                 IDManager.SetID(paymentDateOffsetIDRef_, ob);
             }
             else if (paymentDateOffsetNode.Attributes["href"] != null)
             {
                 paymentDateOffsetIDRef_ = paymentDateOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDateOffset_ = new Offset(paymentDateOffsetNode);
             }
         }
         else
         {
             paymentDateOffset_ = new Offset(paymentDateOffsetNode);
         }
     }
     
 
     XmlNode adjustableDateNode = xmlNode.SelectSingleNode("adjustableDate");
     
     if (adjustableDateNode != null)
     {
         if (adjustableDateNode.Attributes["href"] != null || adjustableDateNode.Attributes["id"] != null) 
         {
             if (adjustableDateNode.Attributes["id"] != null) 
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["id"].Value;
                 AdjustableDate ob = new AdjustableDate(adjustableDateNode);
                 IDManager.SetID(adjustableDateIDRef_, ob);
             }
             else if (adjustableDateNode.Attributes["href"] != null)
             {
                 adjustableDateIDRef_ = adjustableDateNode.Attributes["href"].Value;
             }
             else
             {
                 adjustableDate_ = new AdjustableDate(adjustableDateNode);
             }
         }
         else
         {
             adjustableDate_ = new AdjustableDate(adjustableDateNode);
         }
     }
     
 
 }
 public PaymentDates(XmlNode xmlNode)
 {
     XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");
     
     if (calculationPeriodDatesReferenceNode != null)
     {
         if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
         {
             if (calculationPeriodDatesReferenceNode.Attributes["id"] != null) 
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                 CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                 IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
             }
             else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
             {
                 calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
             }
         }
         else
         {
             calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
         }
     }
     
 
     XmlNode resetDatesReferenceNode = xmlNode.SelectSingleNode("resetDatesReference");
     
     if (resetDatesReferenceNode != null)
     {
         if (resetDatesReferenceNode.Attributes["href"] != null || resetDatesReferenceNode.Attributes["id"] != null) 
         {
             if (resetDatesReferenceNode.Attributes["id"] != null) 
             {
                 resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["id"].Value;
                 ResetDatesReference ob = new ResetDatesReference(resetDatesReferenceNode);
                 IDManager.SetID(resetDatesReferenceIDRef_, ob);
             }
             else if (resetDatesReferenceNode.Attributes["href"] != null)
             {
                 resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
             }
         }
         else
         {
             resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
         }
     }
     
 
     XmlNode valuationDatesReferenceNode = xmlNode.SelectSingleNode("valuationDatesReference");
     
     if (valuationDatesReferenceNode != null)
     {
         if (valuationDatesReferenceNode.Attributes["href"] != null || valuationDatesReferenceNode.Attributes["id"] != null) 
         {
             if (valuationDatesReferenceNode.Attributes["id"] != null) 
             {
                 valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["id"].Value;
                 ValuationDatesReference ob = new ValuationDatesReference(valuationDatesReferenceNode);
                 IDManager.SetID(valuationDatesReferenceIDRef_, ob);
             }
             else if (valuationDatesReferenceNode.Attributes["href"] != null)
             {
                 valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
             }
         }
         else
         {
             valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
         }
     }
     
 
     XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");
     
     if (paymentFrequencyNode != null)
     {
         if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null) 
         {
             if (paymentFrequencyNode.Attributes["id"] != null) 
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                 Frequency ob = new Frequency(paymentFrequencyNode);
                 IDManager.SetID(paymentFrequencyIDRef_, ob);
             }
             else if (paymentFrequencyNode.Attributes["href"] != null)
             {
                 paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
             }
             else
             {
                 paymentFrequency_ = new Frequency(paymentFrequencyNode);
             }
         }
         else
         {
             paymentFrequency_ = new Frequency(paymentFrequencyNode);
         }
     }
     
 
     XmlNode firstPaymentDateNode = xmlNode.SelectSingleNode("firstPaymentDate");
     
     if (firstPaymentDateNode != null)
     {
         if (firstPaymentDateNode.Attributes["href"] != null || firstPaymentDateNode.Attributes["id"] != null) 
         {
             if (firstPaymentDateNode.Attributes["id"] != null) 
             {
                 firstPaymentDateIDRef_ = firstPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(firstPaymentDateNode);
                 IDManager.SetID(firstPaymentDateIDRef_, ob);
             }
             else if (firstPaymentDateNode.Attributes["href"] != null)
             {
                 firstPaymentDateIDRef_ = firstPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 firstPaymentDate_ = new XsdTypeDate(firstPaymentDateNode);
             }
         }
         else
         {
             firstPaymentDate_ = new XsdTypeDate(firstPaymentDateNode);
         }
     }
     
 
     XmlNode lastRegularPaymentDateNode = xmlNode.SelectSingleNode("lastRegularPaymentDate");
     
     if (lastRegularPaymentDateNode != null)
     {
         if (lastRegularPaymentDateNode.Attributes["href"] != null || lastRegularPaymentDateNode.Attributes["id"] != null) 
         {
             if (lastRegularPaymentDateNode.Attributes["id"] != null) 
             {
                 lastRegularPaymentDateIDRef_ = lastRegularPaymentDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(lastRegularPaymentDateNode);
                 IDManager.SetID(lastRegularPaymentDateIDRef_, ob);
             }
             else if (lastRegularPaymentDateNode.Attributes["href"] != null)
             {
                 lastRegularPaymentDateIDRef_ = lastRegularPaymentDateNode.Attributes["href"].Value;
             }
             else
             {
                 lastRegularPaymentDate_ = new XsdTypeDate(lastRegularPaymentDateNode);
             }
         }
         else
         {
             lastRegularPaymentDate_ = new XsdTypeDate(lastRegularPaymentDateNode);
         }
     }
     
 
     XmlNode payRelativeToNode = xmlNode.SelectSingleNode("payRelativeTo");
     
     if (payRelativeToNode != null)
     {
         if (payRelativeToNode.Attributes["href"] != null || payRelativeToNode.Attributes["id"] != null) 
         {
             if (payRelativeToNode.Attributes["id"] != null) 
             {
                 payRelativeToIDRef_ = payRelativeToNode.Attributes["id"].Value;
                 PayRelativeToEnum ob = new PayRelativeToEnum(payRelativeToNode);
                 IDManager.SetID(payRelativeToIDRef_, ob);
             }
             else if (payRelativeToNode.Attributes["href"] != null)
             {
                 payRelativeToIDRef_ = payRelativeToNode.Attributes["href"].Value;
             }
             else
             {
                 payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
             }
         }
         else
         {
             payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
         }
     }
     
 
     XmlNode paymentDaysOffsetNode = xmlNode.SelectSingleNode("paymentDaysOffset");
     
     if (paymentDaysOffsetNode != null)
     {
         if (paymentDaysOffsetNode.Attributes["href"] != null || paymentDaysOffsetNode.Attributes["id"] != null) 
         {
             if (paymentDaysOffsetNode.Attributes["id"] != null) 
             {
                 paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["id"].Value;
                 Offset ob = new Offset(paymentDaysOffsetNode);
                 IDManager.SetID(paymentDaysOffsetIDRef_, ob);
             }
             else if (paymentDaysOffsetNode.Attributes["href"] != null)
             {
                 paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
             }
         }
         else
         {
             paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
         }
     }
     
 
     XmlNode paymentDatesAdjustmentsNode = xmlNode.SelectSingleNode("paymentDatesAdjustments");
     
     if (paymentDatesAdjustmentsNode != null)
     {
         if (paymentDatesAdjustmentsNode.Attributes["href"] != null || paymentDatesAdjustmentsNode.Attributes["id"] != null) 
         {
             if (paymentDatesAdjustmentsNode.Attributes["id"] != null) 
             {
                 paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["id"].Value;
                 BusinessDayAdjustments ob = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                 IDManager.SetID(paymentDatesAdjustmentsIDRef_, ob);
             }
             else if (paymentDatesAdjustmentsNode.Attributes["href"] != null)
             {
                 paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
             }
         }
         else
         {
             paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
         }
     }
     
 
 }
 public DividendPaymentDate(XmlNode xmlNode)
 {
     XmlNodeList dividendDateReferenceNodeList = xmlNode.SelectNodes("dividendDateReference");
     if (dividendDateReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendDateReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendDateReferenceIDRef = item.Attributes["id"].Name;
                 DividendDateReferenceEnum ob = DividendDateReferenceEnum();
                 IDManager.SetID(dividendDateReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendDateReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendDateReference = new DividendDateReferenceEnum(item);
             }
         }
     }
     
 
     XmlNodeList paymentDateOffsetNodeList = xmlNode.SelectNodes("paymentDateOffset");
     if (paymentDateOffsetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDateOffsetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDateOffsetIDRef = item.Attributes["id"].Name;
                 Offset ob = Offset();
                 IDManager.SetID(paymentDateOffsetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDateOffsetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDateOffset = new Offset(item);
             }
         }
     }
     
 
     XmlNodeList adjustableDateNodeList = xmlNode.SelectNodes("adjustableDate");
     if (adjustableDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in adjustableDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 adjustableDateIDRef = item.Attributes["id"].Name;
                 AdjustableDate ob = AdjustableDate();
                 IDManager.SetID(adjustableDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 adjustableDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 adjustableDate = new AdjustableDate(item);
             }
         }
     }
     
 
 }
        public PaymentDates(XmlNode xmlNode)
        {
            XmlNode calculationPeriodDatesReferenceNode = xmlNode.SelectSingleNode("calculationPeriodDatesReference");

            if (calculationPeriodDatesReferenceNode != null)
            {
                if (calculationPeriodDatesReferenceNode.Attributes["href"] != null || calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                {
                    if (calculationPeriodDatesReferenceNode.Attributes["id"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["id"].Value;
                        CalculationPeriodDatesReference ob = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                        IDManager.SetID(calculationPeriodDatesReferenceIDRef_, ob);
                    }
                    else if (calculationPeriodDatesReferenceNode.Attributes["href"] != null)
                    {
                        calculationPeriodDatesReferenceIDRef_ = calculationPeriodDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                    }
                }
                else
                {
                    calculationPeriodDatesReference_ = new CalculationPeriodDatesReference(calculationPeriodDatesReferenceNode);
                }
            }


            XmlNode resetDatesReferenceNode = xmlNode.SelectSingleNode("resetDatesReference");

            if (resetDatesReferenceNode != null)
            {
                if (resetDatesReferenceNode.Attributes["href"] != null || resetDatesReferenceNode.Attributes["id"] != null)
                {
                    if (resetDatesReferenceNode.Attributes["id"] != null)
                    {
                        resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["id"].Value;
                        ResetDatesReference ob = new ResetDatesReference(resetDatesReferenceNode);
                        IDManager.SetID(resetDatesReferenceIDRef_, ob);
                    }
                    else if (resetDatesReferenceNode.Attributes["href"] != null)
                    {
                        resetDatesReferenceIDRef_ = resetDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
                    }
                }
                else
                {
                    resetDatesReference_ = new ResetDatesReference(resetDatesReferenceNode);
                }
            }


            XmlNode valuationDatesReferenceNode = xmlNode.SelectSingleNode("valuationDatesReference");

            if (valuationDatesReferenceNode != null)
            {
                if (valuationDatesReferenceNode.Attributes["href"] != null || valuationDatesReferenceNode.Attributes["id"] != null)
                {
                    if (valuationDatesReferenceNode.Attributes["id"] != null)
                    {
                        valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["id"].Value;
                        ValuationDatesReference ob = new ValuationDatesReference(valuationDatesReferenceNode);
                        IDManager.SetID(valuationDatesReferenceIDRef_, ob);
                    }
                    else if (valuationDatesReferenceNode.Attributes["href"] != null)
                    {
                        valuationDatesReferenceIDRef_ = valuationDatesReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
                    }
                }
                else
                {
                    valuationDatesReference_ = new ValuationDatesReference(valuationDatesReferenceNode);
                }
            }


            XmlNode paymentFrequencyNode = xmlNode.SelectSingleNode("paymentFrequency");

            if (paymentFrequencyNode != null)
            {
                if (paymentFrequencyNode.Attributes["href"] != null || paymentFrequencyNode.Attributes["id"] != null)
                {
                    if (paymentFrequencyNode.Attributes["id"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["id"].Value;
                        Frequency ob = new Frequency(paymentFrequencyNode);
                        IDManager.SetID(paymentFrequencyIDRef_, ob);
                    }
                    else if (paymentFrequencyNode.Attributes["href"] != null)
                    {
                        paymentFrequencyIDRef_ = paymentFrequencyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentFrequency_ = new Frequency(paymentFrequencyNode);
                    }
                }
                else
                {
                    paymentFrequency_ = new Frequency(paymentFrequencyNode);
                }
            }


            XmlNode firstPaymentDateNode = xmlNode.SelectSingleNode("firstPaymentDate");

            if (firstPaymentDateNode != null)
            {
                if (firstPaymentDateNode.Attributes["href"] != null || firstPaymentDateNode.Attributes["id"] != null)
                {
                    if (firstPaymentDateNode.Attributes["id"] != null)
                    {
                        firstPaymentDateIDRef_ = firstPaymentDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(firstPaymentDateNode);
                        IDManager.SetID(firstPaymentDateIDRef_, ob);
                    }
                    else if (firstPaymentDateNode.Attributes["href"] != null)
                    {
                        firstPaymentDateIDRef_ = firstPaymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        firstPaymentDate_ = new XsdTypeDate(firstPaymentDateNode);
                    }
                }
                else
                {
                    firstPaymentDate_ = new XsdTypeDate(firstPaymentDateNode);
                }
            }


            XmlNode lastRegularPaymentDateNode = xmlNode.SelectSingleNode("lastRegularPaymentDate");

            if (lastRegularPaymentDateNode != null)
            {
                if (lastRegularPaymentDateNode.Attributes["href"] != null || lastRegularPaymentDateNode.Attributes["id"] != null)
                {
                    if (lastRegularPaymentDateNode.Attributes["id"] != null)
                    {
                        lastRegularPaymentDateIDRef_ = lastRegularPaymentDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(lastRegularPaymentDateNode);
                        IDManager.SetID(lastRegularPaymentDateIDRef_, ob);
                    }
                    else if (lastRegularPaymentDateNode.Attributes["href"] != null)
                    {
                        lastRegularPaymentDateIDRef_ = lastRegularPaymentDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        lastRegularPaymentDate_ = new XsdTypeDate(lastRegularPaymentDateNode);
                    }
                }
                else
                {
                    lastRegularPaymentDate_ = new XsdTypeDate(lastRegularPaymentDateNode);
                }
            }


            XmlNode payRelativeToNode = xmlNode.SelectSingleNode("payRelativeTo");

            if (payRelativeToNode != null)
            {
                if (payRelativeToNode.Attributes["href"] != null || payRelativeToNode.Attributes["id"] != null)
                {
                    if (payRelativeToNode.Attributes["id"] != null)
                    {
                        payRelativeToIDRef_ = payRelativeToNode.Attributes["id"].Value;
                        PayRelativeToEnum ob = new PayRelativeToEnum(payRelativeToNode);
                        IDManager.SetID(payRelativeToIDRef_, ob);
                    }
                    else if (payRelativeToNode.Attributes["href"] != null)
                    {
                        payRelativeToIDRef_ = payRelativeToNode.Attributes["href"].Value;
                    }
                    else
                    {
                        payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
                    }
                }
                else
                {
                    payRelativeTo_ = new PayRelativeToEnum(payRelativeToNode);
                }
            }


            XmlNode paymentDaysOffsetNode = xmlNode.SelectSingleNode("paymentDaysOffset");

            if (paymentDaysOffsetNode != null)
            {
                if (paymentDaysOffsetNode.Attributes["href"] != null || paymentDaysOffsetNode.Attributes["id"] != null)
                {
                    if (paymentDaysOffsetNode.Attributes["id"] != null)
                    {
                        paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["id"].Value;
                        Offset ob = new Offset(paymentDaysOffsetNode);
                        IDManager.SetID(paymentDaysOffsetIDRef_, ob);
                    }
                    else if (paymentDaysOffsetNode.Attributes["href"] != null)
                    {
                        paymentDaysOffsetIDRef_ = paymentDaysOffsetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
                    }
                }
                else
                {
                    paymentDaysOffset_ = new Offset(paymentDaysOffsetNode);
                }
            }


            XmlNode paymentDatesAdjustmentsNode = xmlNode.SelectSingleNode("paymentDatesAdjustments");

            if (paymentDatesAdjustmentsNode != null)
            {
                if (paymentDatesAdjustmentsNode.Attributes["href"] != null || paymentDatesAdjustmentsNode.Attributes["id"] != null)
                {
                    if (paymentDatesAdjustmentsNode.Attributes["id"] != null)
                    {
                        paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["id"].Value;
                        BusinessDayAdjustments ob = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                        IDManager.SetID(paymentDatesAdjustmentsIDRef_, ob);
                    }
                    else if (paymentDatesAdjustmentsNode.Attributes["href"] != null)
                    {
                        paymentDatesAdjustmentsIDRef_ = paymentDatesAdjustmentsNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                    }
                }
                else
                {
                    paymentDatesAdjustments_ = new BusinessDayAdjustments(paymentDatesAdjustmentsNode);
                }
            }
        }