public CalculationPeriod(XmlNode xmlNode) { XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate"); if (unadjustedStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in unadjustedStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { unadjustedStartDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(unadjustedStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { unadjustedStartDateIDRef = item.Attributes["href"].Name; } else { unadjustedStartDate = new XsdTypeDate(item); } } } XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate"); if (unadjustedEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in unadjustedEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { unadjustedEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(unadjustedEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { unadjustedEndDateIDRef = item.Attributes["href"].Name; } else { unadjustedEndDate = new XsdTypeDate(item); } } } XmlNodeList adjustedStartDateNodeList = xmlNode.SelectNodes("adjustedStartDate"); if (adjustedStartDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in adjustedStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { adjustedStartDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(adjustedStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { adjustedStartDateIDRef = item.Attributes["href"].Name; } else { adjustedStartDate = new XsdTypeDate(item); } } } XmlNodeList adjustedEndDateNodeList = xmlNode.SelectNodes("adjustedEndDate"); if (adjustedEndDateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in adjustedEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { adjustedEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(adjustedEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { adjustedEndDateIDRef = item.Attributes["href"].Name; } else { adjustedEndDate = new XsdTypeDate(item); } } } XmlNodeList calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays"); if (calculationPeriodNumberOfDaysNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name; XsdTypePositiveInteger ob = XsdTypePositiveInteger(); IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name; } else { calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item); } } } XmlNodeList notionalAmountNodeList = xmlNode.SelectNodes("notionalAmount"); if (notionalAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in notionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalAmountIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(notionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalAmountIDRef = item.Attributes["href"].Name; } else { notionalAmount = new XsdTypeDecimal(item); } } } XmlNodeList fxLinkedNotionalAmountNodeList = xmlNode.SelectNodes("fxLinkedNotionalAmount"); if (fxLinkedNotionalAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in fxLinkedNotionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fxLinkedNotionalAmountIDRef = item.Attributes["id"].Name; FxLinkedNotionalAmount ob = FxLinkedNotionalAmount(); IDManager.SetID(fxLinkedNotionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { fxLinkedNotionalAmountIDRef = item.Attributes["href"].Name; } else { fxLinkedNotionalAmount = new FxLinkedNotionalAmount(item); } } } XmlNodeList floatingRateDefinitionNodeList = xmlNode.SelectNodes("floatingRateDefinition"); if (floatingRateDefinitionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in floatingRateDefinitionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingRateDefinitionIDRef = item.Attributes["id"].Name; FloatingRateDefinition ob = FloatingRateDefinition(); IDManager.SetID(floatingRateDefinitionIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingRateDefinitionIDRef = item.Attributes["href"].Name; } else { floatingRateDefinition = new FloatingRateDefinition(item); } } } XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate"); if (fixedRateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in fixedRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fixedRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(fixedRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { fixedRateIDRef = item.Attributes["href"].Name; } else { fixedRate = new XsdTypeDecimal(item); } } } XmlNodeList dayCountYearFractionNodeList = xmlNode.SelectNodes("dayCountYearFraction"); if (dayCountYearFractionNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in dayCountYearFractionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dayCountYearFractionIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(dayCountYearFractionIDRef, ob); } else if (item.Attributes.ToString() == "href") { dayCountYearFractionIDRef = item.Attributes["href"].Name; } else { dayCountYearFraction = new XsdTypeDecimal(item); } } } XmlNodeList forecastAmountNodeList = xmlNode.SelectNodes("forecastAmount"); if (forecastAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in forecastAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { forecastAmountIDRef = item.Attributes["id"].Name; Money ob = Money(); IDManager.SetID(forecastAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { forecastAmountIDRef = item.Attributes["href"].Name; } else { forecastAmount = new Money(item); } } } XmlNodeList forecastRateNodeList = xmlNode.SelectNodes("forecastRate"); if (forecastRateNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in forecastRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { forecastRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(forecastRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { forecastRateIDRef = item.Attributes["href"].Name; } else { forecastRate = new XsdTypeDecimal(item); } } } }
public CalculationPeriod(XmlNode xmlNode) { XmlNode unadjustedStartDateNode = xmlNode.SelectSingleNode("unadjustedStartDate"); if (unadjustedStartDateNode != null) { if (unadjustedStartDateNode.Attributes["href"] != null || unadjustedStartDateNode.Attributes["id"] != null) { if (unadjustedStartDateNode.Attributes["id"] != null) { unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(unadjustedStartDateNode); IDManager.SetID(unadjustedStartDateIDRef_, ob); } else if (unadjustedStartDateNode.Attributes["href"] != null) { unadjustedStartDateIDRef_ = unadjustedStartDateNode.Attributes["href"].Value; } else { unadjustedStartDate_ = new XsdTypeDate(unadjustedStartDateNode); } } else { unadjustedStartDate_ = new XsdTypeDate(unadjustedStartDateNode); } } XmlNode unadjustedEndDateNode = xmlNode.SelectSingleNode("unadjustedEndDate"); if (unadjustedEndDateNode != null) { if (unadjustedEndDateNode.Attributes["href"] != null || unadjustedEndDateNode.Attributes["id"] != null) { if (unadjustedEndDateNode.Attributes["id"] != null) { unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(unadjustedEndDateNode); IDManager.SetID(unadjustedEndDateIDRef_, ob); } else if (unadjustedEndDateNode.Attributes["href"] != null) { unadjustedEndDateIDRef_ = unadjustedEndDateNode.Attributes["href"].Value; } else { unadjustedEndDate_ = new XsdTypeDate(unadjustedEndDateNode); } } else { unadjustedEndDate_ = new XsdTypeDate(unadjustedEndDateNode); } } XmlNode adjustedStartDateNode = xmlNode.SelectSingleNode("adjustedStartDate"); if (adjustedStartDateNode != null) { if (adjustedStartDateNode.Attributes["href"] != null || adjustedStartDateNode.Attributes["id"] != null) { if (adjustedStartDateNode.Attributes["id"] != null) { adjustedStartDateIDRef_ = adjustedStartDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(adjustedStartDateNode); IDManager.SetID(adjustedStartDateIDRef_, ob); } else if (adjustedStartDateNode.Attributes["href"] != null) { adjustedStartDateIDRef_ = adjustedStartDateNode.Attributes["href"].Value; } else { adjustedStartDate_ = new XsdTypeDate(adjustedStartDateNode); } } else { adjustedStartDate_ = new XsdTypeDate(adjustedStartDateNode); } } XmlNode adjustedEndDateNode = xmlNode.SelectSingleNode("adjustedEndDate"); if (adjustedEndDateNode != null) { if (adjustedEndDateNode.Attributes["href"] != null || adjustedEndDateNode.Attributes["id"] != null) { if (adjustedEndDateNode.Attributes["id"] != null) { adjustedEndDateIDRef_ = adjustedEndDateNode.Attributes["id"].Value; XsdTypeDate ob = new XsdTypeDate(adjustedEndDateNode); IDManager.SetID(adjustedEndDateIDRef_, ob); } else if (adjustedEndDateNode.Attributes["href"] != null) { adjustedEndDateIDRef_ = adjustedEndDateNode.Attributes["href"].Value; } else { adjustedEndDate_ = new XsdTypeDate(adjustedEndDateNode); } } else { adjustedEndDate_ = new XsdTypeDate(adjustedEndDateNode); } } XmlNode calculationPeriodNumberOfDaysNode = xmlNode.SelectSingleNode("calculationPeriodNumberOfDays"); if (calculationPeriodNumberOfDaysNode != null) { if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null || calculationPeriodNumberOfDaysNode.Attributes["id"] != null) { if (calculationPeriodNumberOfDaysNode.Attributes["id"] != null) { calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["id"].Value; XsdTypePositiveInteger ob = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode); IDManager.SetID(calculationPeriodNumberOfDaysIDRef_, ob); } else if (calculationPeriodNumberOfDaysNode.Attributes["href"] != null) { calculationPeriodNumberOfDaysIDRef_ = calculationPeriodNumberOfDaysNode.Attributes["href"].Value; } else { calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode); } } else { calculationPeriodNumberOfDays_ = new XsdTypePositiveInteger(calculationPeriodNumberOfDaysNode); } } XmlNode notionalAmountNode = xmlNode.SelectSingleNode("notionalAmount"); if (notionalAmountNode != null) { if (notionalAmountNode.Attributes["href"] != null || notionalAmountNode.Attributes["id"] != null) { if (notionalAmountNode.Attributes["id"] != null) { notionalAmountIDRef_ = notionalAmountNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(notionalAmountNode); IDManager.SetID(notionalAmountIDRef_, ob); } else if (notionalAmountNode.Attributes["href"] != null) { notionalAmountIDRef_ = notionalAmountNode.Attributes["href"].Value; } else { notionalAmount_ = new XsdTypeDecimal(notionalAmountNode); } } else { notionalAmount_ = new XsdTypeDecimal(notionalAmountNode); } } XmlNode fxLinkedNotionalAmountNode = xmlNode.SelectSingleNode("fxLinkedNotionalAmount"); if (fxLinkedNotionalAmountNode != null) { if (fxLinkedNotionalAmountNode.Attributes["href"] != null || fxLinkedNotionalAmountNode.Attributes["id"] != null) { if (fxLinkedNotionalAmountNode.Attributes["id"] != null) { fxLinkedNotionalAmountIDRef_ = fxLinkedNotionalAmountNode.Attributes["id"].Value; FxLinkedNotionalAmount ob = new FxLinkedNotionalAmount(fxLinkedNotionalAmountNode); IDManager.SetID(fxLinkedNotionalAmountIDRef_, ob); } else if (fxLinkedNotionalAmountNode.Attributes["href"] != null) { fxLinkedNotionalAmountIDRef_ = fxLinkedNotionalAmountNode.Attributes["href"].Value; } else { fxLinkedNotionalAmount_ = new FxLinkedNotionalAmount(fxLinkedNotionalAmountNode); } } else { fxLinkedNotionalAmount_ = new FxLinkedNotionalAmount(fxLinkedNotionalAmountNode); } } XmlNode floatingRateDefinitionNode = xmlNode.SelectSingleNode("floatingRateDefinition"); if (floatingRateDefinitionNode != null) { if (floatingRateDefinitionNode.Attributes["href"] != null || floatingRateDefinitionNode.Attributes["id"] != null) { if (floatingRateDefinitionNode.Attributes["id"] != null) { floatingRateDefinitionIDRef_ = floatingRateDefinitionNode.Attributes["id"].Value; FloatingRateDefinition ob = new FloatingRateDefinition(floatingRateDefinitionNode); IDManager.SetID(floatingRateDefinitionIDRef_, ob); } else if (floatingRateDefinitionNode.Attributes["href"] != null) { floatingRateDefinitionIDRef_ = floatingRateDefinitionNode.Attributes["href"].Value; } else { floatingRateDefinition_ = new FloatingRateDefinition(floatingRateDefinitionNode); } } else { floatingRateDefinition_ = new FloatingRateDefinition(floatingRateDefinitionNode); } } XmlNode fixedRateNode = xmlNode.SelectSingleNode("fixedRate"); if (fixedRateNode != null) { if (fixedRateNode.Attributes["href"] != null || fixedRateNode.Attributes["id"] != null) { if (fixedRateNode.Attributes["id"] != null) { fixedRateIDRef_ = fixedRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(fixedRateNode); IDManager.SetID(fixedRateIDRef_, ob); } else if (fixedRateNode.Attributes["href"] != null) { fixedRateIDRef_ = fixedRateNode.Attributes["href"].Value; } else { fixedRate_ = new XsdTypeDecimal(fixedRateNode); } } else { fixedRate_ = new XsdTypeDecimal(fixedRateNode); } } XmlNode dayCountYearFractionNode = xmlNode.SelectSingleNode("dayCountYearFraction"); if (dayCountYearFractionNode != null) { if (dayCountYearFractionNode.Attributes["href"] != null || dayCountYearFractionNode.Attributes["id"] != null) { if (dayCountYearFractionNode.Attributes["id"] != null) { dayCountYearFractionIDRef_ = dayCountYearFractionNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(dayCountYearFractionNode); IDManager.SetID(dayCountYearFractionIDRef_, ob); } else if (dayCountYearFractionNode.Attributes["href"] != null) { dayCountYearFractionIDRef_ = dayCountYearFractionNode.Attributes["href"].Value; } else { dayCountYearFraction_ = new XsdTypeDecimal(dayCountYearFractionNode); } } else { dayCountYearFraction_ = new XsdTypeDecimal(dayCountYearFractionNode); } } XmlNode forecastAmountNode = xmlNode.SelectSingleNode("forecastAmount"); if (forecastAmountNode != null) { if (forecastAmountNode.Attributes["href"] != null || forecastAmountNode.Attributes["id"] != null) { if (forecastAmountNode.Attributes["id"] != null) { forecastAmountIDRef_ = forecastAmountNode.Attributes["id"].Value; Money ob = new Money(forecastAmountNode); IDManager.SetID(forecastAmountIDRef_, ob); } else if (forecastAmountNode.Attributes["href"] != null) { forecastAmountIDRef_ = forecastAmountNode.Attributes["href"].Value; } else { forecastAmount_ = new Money(forecastAmountNode); } } else { forecastAmount_ = new Money(forecastAmountNode); } } XmlNode forecastRateNode = xmlNode.SelectSingleNode("forecastRate"); if (forecastRateNode != null) { if (forecastRateNode.Attributes["href"] != null || forecastRateNode.Attributes["id"] != null) { if (forecastRateNode.Attributes["id"] != null) { forecastRateIDRef_ = forecastRateNode.Attributes["id"].Value; XsdTypeDecimal ob = new XsdTypeDecimal(forecastRateNode); IDManager.SetID(forecastRateIDRef_, ob); } else if (forecastRateNode.Attributes["href"] != null) { forecastRateIDRef_ = forecastRateNode.Attributes["href"].Value; } else { forecastRate_ = new XsdTypeDecimal(forecastRateNode); } } else { forecastRate_ = new XsdTypeDecimal(forecastRateNode); } } }
public CalculationPeriod(XmlNode xmlNode) { XmlNodeList unadjustedStartDateNodeList = xmlNode.SelectNodes("unadjustedStartDate"); if (unadjustedStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in unadjustedStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { unadjustedStartDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(unadjustedStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { unadjustedStartDateIDRef = item.Attributes["href"].Name; } else { unadjustedStartDate = new XsdTypeDate(item); } } } XmlNodeList unadjustedEndDateNodeList = xmlNode.SelectNodes("unadjustedEndDate"); if (unadjustedEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in unadjustedEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { unadjustedEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(unadjustedEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { unadjustedEndDateIDRef = item.Attributes["href"].Name; } else { unadjustedEndDate = new XsdTypeDate(item); } } } XmlNodeList adjustedStartDateNodeList = xmlNode.SelectNodes("adjustedStartDate"); if (adjustedStartDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in adjustedStartDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { adjustedStartDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(adjustedStartDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { adjustedStartDateIDRef = item.Attributes["href"].Name; } else { adjustedStartDate = new XsdTypeDate(item); } } } XmlNodeList adjustedEndDateNodeList = xmlNode.SelectNodes("adjustedEndDate"); if (adjustedEndDateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in adjustedEndDateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { adjustedEndDateIDRef = item.Attributes["id"].Name; XsdTypeDate ob = XsdTypeDate(); IDManager.SetID(adjustedEndDateIDRef, ob); } else if (item.Attributes.ToString() == "href") { adjustedEndDateIDRef = item.Attributes["href"].Name; } else { adjustedEndDate = new XsdTypeDate(item); } } } XmlNodeList calculationPeriodNumberOfDaysNodeList = xmlNode.SelectNodes("calculationPeriodNumberOfDays"); if (calculationPeriodNumberOfDaysNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in calculationPeriodNumberOfDaysNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { calculationPeriodNumberOfDaysIDRef = item.Attributes["id"].Name; XsdTypePositiveInteger ob = XsdTypePositiveInteger(); IDManager.SetID(calculationPeriodNumberOfDaysIDRef, ob); } else if (item.Attributes.ToString() == "href") { calculationPeriodNumberOfDaysIDRef = item.Attributes["href"].Name; } else { calculationPeriodNumberOfDays = new XsdTypePositiveInteger(item); } } } XmlNodeList notionalAmountNodeList = xmlNode.SelectNodes("notionalAmount"); if (notionalAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in notionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { notionalAmountIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(notionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { notionalAmountIDRef = item.Attributes["href"].Name; } else { notionalAmount = new XsdTypeDecimal(item); } } } XmlNodeList fxLinkedNotionalAmountNodeList = xmlNode.SelectNodes("fxLinkedNotionalAmount"); if (fxLinkedNotionalAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fxLinkedNotionalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fxLinkedNotionalAmountIDRef = item.Attributes["id"].Name; FxLinkedNotionalAmount ob = FxLinkedNotionalAmount(); IDManager.SetID(fxLinkedNotionalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { fxLinkedNotionalAmountIDRef = item.Attributes["href"].Name; } else { fxLinkedNotionalAmount = new FxLinkedNotionalAmount(item); } } } XmlNodeList floatingRateDefinitionNodeList = xmlNode.SelectNodes("floatingRateDefinition"); if (floatingRateDefinitionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in floatingRateDefinitionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { floatingRateDefinitionIDRef = item.Attributes["id"].Name; FloatingRateDefinition ob = FloatingRateDefinition(); IDManager.SetID(floatingRateDefinitionIDRef, ob); } else if (item.Attributes.ToString() == "href") { floatingRateDefinitionIDRef = item.Attributes["href"].Name; } else { floatingRateDefinition = new FloatingRateDefinition(item); } } } XmlNodeList fixedRateNodeList = xmlNode.SelectNodes("fixedRate"); if (fixedRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in fixedRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { fixedRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(fixedRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { fixedRateIDRef = item.Attributes["href"].Name; } else { fixedRate = new XsdTypeDecimal(item); } } } XmlNodeList dayCountYearFractionNodeList = xmlNode.SelectNodes("dayCountYearFraction"); if (dayCountYearFractionNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in dayCountYearFractionNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { dayCountYearFractionIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(dayCountYearFractionIDRef, ob); } else if (item.Attributes.ToString() == "href") { dayCountYearFractionIDRef = item.Attributes["href"].Name; } else { dayCountYearFraction = new XsdTypeDecimal(item); } } } XmlNodeList forecastAmountNodeList = xmlNode.SelectNodes("forecastAmount"); if (forecastAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in forecastAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { forecastAmountIDRef = item.Attributes["id"].Name; Money ob = Money(); IDManager.SetID(forecastAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { forecastAmountIDRef = item.Attributes["href"].Name; } else { forecastAmount = new Money(item); } } } XmlNodeList forecastRateNodeList = xmlNode.SelectNodes("forecastRate"); if (forecastRateNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in forecastRateNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { forecastRateIDRef = item.Attributes["id"].Name; XsdTypeDecimal ob = XsdTypeDecimal(); IDManager.SetID(forecastRateIDRef, ob); } else if (item.Attributes.ToString() == "href") { forecastRateIDRef = item.Attributes["href"].Name; } else { forecastRate = new XsdTypeDecimal(item); } } } }