public RelativeDates(XmlNode xmlNode) : base(xmlNode) { XmlNodeList periodSkipNodeList = xmlNode.SelectNodes("periodSkip"); if (periodSkipNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in periodSkipNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { periodSkipIDRef = item.Attributes["id"].Name; XsdTypePositiveInteger ob = XsdTypePositiveInteger(); IDManager.SetID(periodSkipIDRef, ob); } else if (item.Attributes.ToString() == "href") { periodSkipIDRef = item.Attributes["href"].Name; } else { periodSkip = new XsdTypePositiveInteger(item); } } } XmlNodeList scheduleBoundsNodeList = xmlNode.SelectNodes("scheduleBounds"); if (scheduleBoundsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in scheduleBoundsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { scheduleBoundsIDRef = item.Attributes["id"].Name; DateRange ob = DateRange(); IDManager.SetID(scheduleBoundsIDRef, ob); } else if (item.Attributes.ToString() == "href") { scheduleBoundsIDRef = item.Attributes["href"].Name; } else { scheduleBounds = new DateRange(item); } } } }
public RelativeDates(XmlNode xmlNode) : base(xmlNode) { XmlNode periodSkipNode = xmlNode.SelectSingleNode("periodSkip"); if (periodSkipNode != null) { if (periodSkipNode.Attributes["href"] != null || periodSkipNode.Attributes["id"] != null) { if (periodSkipNode.Attributes["id"] != null) { periodSkipIDRef_ = periodSkipNode.Attributes["id"].Value; XsdTypePositiveInteger ob = new XsdTypePositiveInteger(periodSkipNode); IDManager.SetID(periodSkipIDRef_, ob); } else if (periodSkipNode.Attributes["href"] != null) { periodSkipIDRef_ = periodSkipNode.Attributes["href"].Value; } else { periodSkip_ = new XsdTypePositiveInteger(periodSkipNode); } } else { periodSkip_ = new XsdTypePositiveInteger(periodSkipNode); } } XmlNode scheduleBoundsNode = xmlNode.SelectSingleNode("scheduleBounds"); if (scheduleBoundsNode != null) { if (scheduleBoundsNode.Attributes["href"] != null || scheduleBoundsNode.Attributes["id"] != null) { if (scheduleBoundsNode.Attributes["id"] != null) { scheduleBoundsIDRef_ = scheduleBoundsNode.Attributes["id"].Value; DateRange ob = new DateRange(scheduleBoundsNode); IDManager.SetID(scheduleBoundsIDRef_, ob); } else if (scheduleBoundsNode.Attributes["href"] != null) { scheduleBoundsIDRef_ = scheduleBoundsNode.Attributes["href"].Value; } else { scheduleBounds_ = new DateRange(scheduleBoundsNode); } } else { scheduleBounds_ = new DateRange(scheduleBoundsNode); } } }