public AdjustableRelativeOrPeriodicDates2(XmlNode xmlNode) { XmlNodeList adjustableDatesNodeList = xmlNode.SelectNodes("adjustableDates"); if (adjustableDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in adjustableDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { adjustableDatesIDRef = item.Attributes["id"].Name; AdjustableDates ob = AdjustableDates(); IDManager.SetID(adjustableDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { adjustableDatesIDRef = item.Attributes["href"].Name; } else { adjustableDates = new AdjustableDates(item); } } } XmlNodeList relativeDatesNodeList = xmlNode.SelectNodes("relativeDates"); if (relativeDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in relativeDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeDatesIDRef = item.Attributes["id"].Name; RelativeDates ob = RelativeDates(); IDManager.SetID(relativeDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeDatesIDRef = item.Attributes["href"].Name; } else { relativeDates = new RelativeDates(item); } } } XmlNodeList periodicDatesNodeList = xmlNode.SelectNodes("periodicDates"); if (periodicDatesNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in periodicDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { periodicDatesIDRef = item.Attributes["id"].Name; PeriodicDates ob = PeriodicDates(); IDManager.SetID(periodicDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { periodicDatesIDRef = item.Attributes["href"].Name; } else { periodicDates = new PeriodicDates(item); } } } }
public AdjustableRelativeOrPeriodicDates2(XmlNode xmlNode) { XmlNode adjustableDatesNode = xmlNode.SelectSingleNode("adjustableDates"); if (adjustableDatesNode != null) { if (adjustableDatesNode.Attributes["href"] != null || adjustableDatesNode.Attributes["id"] != null) { if (adjustableDatesNode.Attributes["id"] != null) { adjustableDatesIDRef_ = adjustableDatesNode.Attributes["id"].Value; AdjustableDates ob = new AdjustableDates(adjustableDatesNode); IDManager.SetID(adjustableDatesIDRef_, ob); } else if (adjustableDatesNode.Attributes["href"] != null) { adjustableDatesIDRef_ = adjustableDatesNode.Attributes["href"].Value; } else { adjustableDates_ = new AdjustableDates(adjustableDatesNode); } } else { adjustableDates_ = new AdjustableDates(adjustableDatesNode); } } XmlNode relativeDatesNode = xmlNode.SelectSingleNode("relativeDates"); if (relativeDatesNode != null) { if (relativeDatesNode.Attributes["href"] != null || relativeDatesNode.Attributes["id"] != null) { if (relativeDatesNode.Attributes["id"] != null) { relativeDatesIDRef_ = relativeDatesNode.Attributes["id"].Value; RelativeDates ob = new RelativeDates(relativeDatesNode); IDManager.SetID(relativeDatesIDRef_, ob); } else if (relativeDatesNode.Attributes["href"] != null) { relativeDatesIDRef_ = relativeDatesNode.Attributes["href"].Value; } else { relativeDates_ = new RelativeDates(relativeDatesNode); } } else { relativeDates_ = new RelativeDates(relativeDatesNode); } } XmlNode periodicDatesNode = xmlNode.SelectSingleNode("periodicDates"); if (periodicDatesNode != null) { if (periodicDatesNode.Attributes["href"] != null || periodicDatesNode.Attributes["id"] != null) { if (periodicDatesNode.Attributes["id"] != null) { periodicDatesIDRef_ = periodicDatesNode.Attributes["id"].Value; PeriodicDates ob = new PeriodicDates(periodicDatesNode); IDManager.SetID(periodicDatesIDRef_, ob); } else if (periodicDatesNode.Attributes["href"] != null) { periodicDatesIDRef_ = periodicDatesNode.Attributes["href"].Value; } else { periodicDates_ = new PeriodicDates(periodicDatesNode); } } else { periodicDates_ = new PeriodicDates(periodicDatesNode); } } }
public AdjustableRelativeOrPeriodicDates2(XmlNode xmlNode) { XmlNodeList adjustableDatesNodeList = xmlNode.SelectNodes("adjustableDates"); if (adjustableDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in adjustableDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { adjustableDatesIDRef = item.Attributes["id"].Name; AdjustableDates ob = AdjustableDates(); IDManager.SetID(adjustableDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { adjustableDatesIDRef = item.Attributes["href"].Name; } else { adjustableDates = new AdjustableDates(item); } } } XmlNodeList relativeDatesNodeList = xmlNode.SelectNodes("relativeDates"); if (relativeDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in relativeDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { relativeDatesIDRef = item.Attributes["id"].Name; RelativeDates ob = RelativeDates(); IDManager.SetID(relativeDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { relativeDatesIDRef = item.Attributes["href"].Name; } else { relativeDates = new RelativeDates(item); } } } XmlNodeList periodicDatesNodeList = xmlNode.SelectNodes("periodicDates"); if (periodicDatesNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in periodicDatesNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { periodicDatesIDRef = item.Attributes["id"].Name; PeriodicDates ob = PeriodicDates(); IDManager.SetID(periodicDatesIDRef, ob); } else if (item.Attributes.ToString() == "href") { periodicDatesIDRef = item.Attributes["href"].Name; } else { periodicDates = new PeriodicDates(item); } } } }