public PhysicalSettlementTerms(XmlNode xmlNode) : base(xmlNode) { XmlNode physicalSettlementPeriodNode = xmlNode.SelectSingleNode("physicalSettlementPeriod"); if (physicalSettlementPeriodNode != null) { if (physicalSettlementPeriodNode.Attributes["href"] != null || physicalSettlementPeriodNode.Attributes["id"] != null) { if (physicalSettlementPeriodNode.Attributes["id"] != null) { physicalSettlementPeriodIDRef_ = physicalSettlementPeriodNode.Attributes["id"].Value; PhysicalSettlementPeriod ob = new PhysicalSettlementPeriod(physicalSettlementPeriodNode); IDManager.SetID(physicalSettlementPeriodIDRef_, ob); } else if (physicalSettlementPeriodNode.Attributes["href"] != null) { physicalSettlementPeriodIDRef_ = physicalSettlementPeriodNode.Attributes["href"].Value; } else { physicalSettlementPeriod_ = new PhysicalSettlementPeriod(physicalSettlementPeriodNode); } } else { physicalSettlementPeriod_ = new PhysicalSettlementPeriod(physicalSettlementPeriodNode); } } XmlNode deliverableObligationsNode = xmlNode.SelectSingleNode("deliverableObligations"); if (deliverableObligationsNode != null) { if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null) { if (deliverableObligationsNode.Attributes["id"] != null) { deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value; DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode); IDManager.SetID(deliverableObligationsIDRef_, ob); } else if (deliverableObligationsNode.Attributes["href"] != null) { deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value; } else { deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode); } } else { deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode); } } XmlNode escrowNode = xmlNode.SelectSingleNode("escrow"); if (escrowNode != null) { if (escrowNode.Attributes["href"] != null || escrowNode.Attributes["id"] != null) { if (escrowNode.Attributes["id"] != null) { escrowIDRef_ = escrowNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(escrowNode); IDManager.SetID(escrowIDRef_, ob); } else if (escrowNode.Attributes["href"] != null) { escrowIDRef_ = escrowNode.Attributes["href"].Value; } else { escrow_ = new XsdTypeBoolean(escrowNode); } } else { escrow_ = new XsdTypeBoolean(escrowNode); } } XmlNode sixtyBusinessDaySettlementCapNode = xmlNode.SelectSingleNode("sixtyBusinessDaySettlementCap"); if (sixtyBusinessDaySettlementCapNode != null) { if (sixtyBusinessDaySettlementCapNode.Attributes["href"] != null || sixtyBusinessDaySettlementCapNode.Attributes["id"] != null) { if (sixtyBusinessDaySettlementCapNode.Attributes["id"] != null) { sixtyBusinessDaySettlementCapIDRef_ = sixtyBusinessDaySettlementCapNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(sixtyBusinessDaySettlementCapNode); IDManager.SetID(sixtyBusinessDaySettlementCapIDRef_, ob); } else if (sixtyBusinessDaySettlementCapNode.Attributes["href"] != null) { sixtyBusinessDaySettlementCapIDRef_ = sixtyBusinessDaySettlementCapNode.Attributes["href"].Value; } else { sixtyBusinessDaySettlementCap_ = new XsdTypeBoolean(sixtyBusinessDaySettlementCapNode); } } else { sixtyBusinessDaySettlementCap_ = new XsdTypeBoolean(sixtyBusinessDaySettlementCapNode); } } }
public PhysicalSettlementTerms(XmlNode xmlNode) : base(xmlNode) { XmlNodeList physicalSettlementPeriodNodeList = xmlNode.SelectNodes("physicalSettlementPeriod"); if (physicalSettlementPeriodNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in physicalSettlementPeriodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalSettlementPeriodIDRef = item.Attributes["id"].Name; PhysicalSettlementPeriod ob = PhysicalSettlementPeriod(); IDManager.SetID(physicalSettlementPeriodIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalSettlementPeriodIDRef = item.Attributes["href"].Name; } else { physicalSettlementPeriod = new PhysicalSettlementPeriod(item); } } } XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations"); if (deliverableObligationsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliverableObligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliverableObligationsIDRef = item.Attributes["id"].Name; DeliverableObligations ob = DeliverableObligations(); IDManager.SetID(deliverableObligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliverableObligationsIDRef = item.Attributes["href"].Name; } else { deliverableObligations = new DeliverableObligations(item); } } } XmlNodeList escrowNodeList = xmlNode.SelectNodes("escrow"); if (escrowNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in escrowNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { escrowIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(escrowIDRef, ob); } else if (item.Attributes.ToString() == "href") { escrowIDRef = item.Attributes["href"].Name; } else { escrow = new XsdTypeBoolean(item); } } } XmlNodeList sixtyBusinessDaySettlementCapNodeList = xmlNode.SelectNodes("sixtyBusinessDaySettlementCap"); if (sixtyBusinessDaySettlementCapNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in sixtyBusinessDaySettlementCapNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sixtyBusinessDaySettlementCapIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(sixtyBusinessDaySettlementCapIDRef, ob); } else if (item.Attributes.ToString() == "href") { sixtyBusinessDaySettlementCapIDRef = item.Attributes["href"].Name; } else { sixtyBusinessDaySettlementCap = new XsdTypeBoolean(item); } } } }
public CreditCurve(XmlNode xmlNode) : base(xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference"); if (creditEntityReferenceNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEntityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEntityReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(creditEntityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEntityReferenceIDRef = item.Attributes["href"].Name; } else { creditEntityReference = new LegalEntityReference(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority"); if (seniorityNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in seniorityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { seniorityIDRef = item.Attributes["id"].Name; CreditSeniority ob = CreditSeniority(); IDManager.SetID(seniorityIDRef, ob); } else if (item.Attributes.ToString() == "href") { seniorityIDRef = item.Attributes["href"].Name; } else { seniority = new CreditSeniority(item); } } } XmlNodeList securedNodeList = xmlNode.SelectNodes("secured"); if (securedNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in securedNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { securedIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(securedIDRef, ob); } else if (item.Attributes.ToString() == "href") { securedIDRef = item.Attributes["href"].Name; } else { secured = new XsdTypeBoolean(item); } } } XmlNodeList obligationCurrencyNodeList = xmlNode.SelectNodes("obligationCurrency"); if (obligationCurrencyNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(obligationCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationCurrencyIDRef = item.Attributes["href"].Name; } else { obligationCurrency = new Currency(item); } } } XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations"); if (obligationsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in obligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationsIDRef = item.Attributes["id"].Name; Obligations ob = Obligations(); IDManager.SetID(obligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationsIDRef = item.Attributes["href"].Name; } else { obligations = new Obligations(item); } } } XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations"); if (deliverableObligationsNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in deliverableObligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliverableObligationsIDRef = item.Attributes["id"].Name; DeliverableObligations ob = DeliverableObligations(); IDManager.SetID(deliverableObligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliverableObligationsIDRef = item.Attributes["href"].Name; } else { deliverableObligations = new DeliverableObligations(item); } } } }
public CreditCurve(XmlNode xmlNode) : base(xmlNode) { XmlNode referenceEntityNode = xmlNode.SelectSingleNode("referenceEntity"); if (referenceEntityNode != null) { if (referenceEntityNode.Attributes["href"] != null || referenceEntityNode.Attributes["id"] != null) { if (referenceEntityNode.Attributes["id"] != null) { referenceEntityIDRef_ = referenceEntityNode.Attributes["id"].Value; LegalEntity ob = new LegalEntity(referenceEntityNode); IDManager.SetID(referenceEntityIDRef_, ob); } else if (referenceEntityNode.Attributes["href"] != null) { referenceEntityIDRef_ = referenceEntityNode.Attributes["href"].Value; } else { referenceEntity_ = new LegalEntity(referenceEntityNode); } } else { referenceEntity_ = new LegalEntity(referenceEntityNode); } } XmlNode creditEntityReferenceNode = xmlNode.SelectSingleNode("creditEntityReference"); if (creditEntityReferenceNode != null) { if (creditEntityReferenceNode.Attributes["href"] != null || creditEntityReferenceNode.Attributes["id"] != null) { if (creditEntityReferenceNode.Attributes["id"] != null) { creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["id"].Value; LegalEntityReference ob = new LegalEntityReference(creditEntityReferenceNode); IDManager.SetID(creditEntityReferenceIDRef_, ob); } else if (creditEntityReferenceNode.Attributes["href"] != null) { creditEntityReferenceIDRef_ = creditEntityReferenceNode.Attributes["href"].Value; } else { creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode); } } else { creditEntityReference_ = new LegalEntityReference(creditEntityReferenceNode); } } XmlNode creditEventsNode = xmlNode.SelectSingleNode("creditEvents"); if (creditEventsNode != null) { if (creditEventsNode.Attributes["href"] != null || creditEventsNode.Attributes["id"] != null) { if (creditEventsNode.Attributes["id"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["id"].Value; CreditEvents ob = new CreditEvents(creditEventsNode); IDManager.SetID(creditEventsIDRef_, ob); } else if (creditEventsNode.Attributes["href"] != null) { creditEventsIDRef_ = creditEventsNode.Attributes["href"].Value; } else { creditEvents_ = new CreditEvents(creditEventsNode); } } else { creditEvents_ = new CreditEvents(creditEventsNode); } } XmlNode seniorityNode = xmlNode.SelectSingleNode("seniority"); if (seniorityNode != null) { if (seniorityNode.Attributes["href"] != null || seniorityNode.Attributes["id"] != null) { if (seniorityNode.Attributes["id"] != null) { seniorityIDRef_ = seniorityNode.Attributes["id"].Value; CreditSeniority ob = new CreditSeniority(seniorityNode); IDManager.SetID(seniorityIDRef_, ob); } else if (seniorityNode.Attributes["href"] != null) { seniorityIDRef_ = seniorityNode.Attributes["href"].Value; } else { seniority_ = new CreditSeniority(seniorityNode); } } else { seniority_ = new CreditSeniority(seniorityNode); } } XmlNode securedNode = xmlNode.SelectSingleNode("secured"); if (securedNode != null) { if (securedNode.Attributes["href"] != null || securedNode.Attributes["id"] != null) { if (securedNode.Attributes["id"] != null) { securedIDRef_ = securedNode.Attributes["id"].Value; XsdTypeBoolean ob = new XsdTypeBoolean(securedNode); IDManager.SetID(securedIDRef_, ob); } else if (securedNode.Attributes["href"] != null) { securedIDRef_ = securedNode.Attributes["href"].Value; } else { secured_ = new XsdTypeBoolean(securedNode); } } else { secured_ = new XsdTypeBoolean(securedNode); } } XmlNode obligationCurrencyNode = xmlNode.SelectSingleNode("obligationCurrency"); if (obligationCurrencyNode != null) { if (obligationCurrencyNode.Attributes["href"] != null || obligationCurrencyNode.Attributes["id"] != null) { if (obligationCurrencyNode.Attributes["id"] != null) { obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["id"].Value; Currency ob = new Currency(obligationCurrencyNode); IDManager.SetID(obligationCurrencyIDRef_, ob); } else if (obligationCurrencyNode.Attributes["href"] != null) { obligationCurrencyIDRef_ = obligationCurrencyNode.Attributes["href"].Value; } else { obligationCurrency_ = new Currency(obligationCurrencyNode); } } else { obligationCurrency_ = new Currency(obligationCurrencyNode); } } XmlNode obligationsNode = xmlNode.SelectSingleNode("obligations"); if (obligationsNode != null) { if (obligationsNode.Attributes["href"] != null || obligationsNode.Attributes["id"] != null) { if (obligationsNode.Attributes["id"] != null) { obligationsIDRef_ = obligationsNode.Attributes["id"].Value; Obligations ob = new Obligations(obligationsNode); IDManager.SetID(obligationsIDRef_, ob); } else if (obligationsNode.Attributes["href"] != null) { obligationsIDRef_ = obligationsNode.Attributes["href"].Value; } else { obligations_ = new Obligations(obligationsNode); } } else { obligations_ = new Obligations(obligationsNode); } } XmlNode deliverableObligationsNode = xmlNode.SelectSingleNode("deliverableObligations"); if (deliverableObligationsNode != null) { if (deliverableObligationsNode.Attributes["href"] != null || deliverableObligationsNode.Attributes["id"] != null) { if (deliverableObligationsNode.Attributes["id"] != null) { deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["id"].Value; DeliverableObligations ob = new DeliverableObligations(deliverableObligationsNode); IDManager.SetID(deliverableObligationsIDRef_, ob); } else if (deliverableObligationsNode.Attributes["href"] != null) { deliverableObligationsIDRef_ = deliverableObligationsNode.Attributes["href"].Value; } else { deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode); } } else { deliverableObligations_ = new DeliverableObligations(deliverableObligationsNode); } } }
public PhysicalSettlementTerms(XmlNode xmlNode) : base(xmlNode) { XmlNodeList physicalSettlementPeriodNodeList = xmlNode.SelectNodes("physicalSettlementPeriod"); if (physicalSettlementPeriodNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in physicalSettlementPeriodNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { physicalSettlementPeriodIDRef = item.Attributes["id"].Name; PhysicalSettlementPeriod ob = PhysicalSettlementPeriod(); IDManager.SetID(physicalSettlementPeriodIDRef, ob); } else if (item.Attributes.ToString() == "href") { physicalSettlementPeriodIDRef = item.Attributes["href"].Name; } else { physicalSettlementPeriod = new PhysicalSettlementPeriod(item); } } } XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations"); if (deliverableObligationsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deliverableObligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliverableObligationsIDRef = item.Attributes["id"].Name; DeliverableObligations ob = DeliverableObligations(); IDManager.SetID(deliverableObligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliverableObligationsIDRef = item.Attributes["href"].Name; } else { deliverableObligations = new DeliverableObligations(item); } } } XmlNodeList escrowNodeList = xmlNode.SelectNodes("escrow"); if (escrowNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in escrowNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { escrowIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(escrowIDRef, ob); } else if (item.Attributes.ToString() == "href") { escrowIDRef = item.Attributes["href"].Name; } else { escrow = new XsdTypeBoolean(item); } } } XmlNodeList sixtyBusinessDaySettlementCapNodeList = xmlNode.SelectNodes("sixtyBusinessDaySettlementCap"); if (sixtyBusinessDaySettlementCapNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in sixtyBusinessDaySettlementCapNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { sixtyBusinessDaySettlementCapIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(sixtyBusinessDaySettlementCapIDRef, ob); } else if (item.Attributes.ToString() == "href") { sixtyBusinessDaySettlementCapIDRef = item.Attributes["href"].Name; } else { sixtyBusinessDaySettlementCap = new XsdTypeBoolean(item); } } } }
public CreditCurve(XmlNode xmlNode) : base(xmlNode) { XmlNodeList referenceEntityNodeList = xmlNode.SelectNodes("referenceEntity"); if (referenceEntityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in referenceEntityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { referenceEntityIDRef = item.Attributes["id"].Name; LegalEntity ob = LegalEntity(); IDManager.SetID(referenceEntityIDRef, ob); } else if (item.Attributes.ToString() == "href") { referenceEntityIDRef = item.Attributes["href"].Name; } else { referenceEntity = new LegalEntity(item); } } } XmlNodeList creditEntityReferenceNodeList = xmlNode.SelectNodes("creditEntityReference"); if (creditEntityReferenceNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEntityReferenceNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEntityReferenceIDRef = item.Attributes["id"].Name; LegalEntityReference ob = LegalEntityReference(); IDManager.SetID(creditEntityReferenceIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEntityReferenceIDRef = item.Attributes["href"].Name; } else { creditEntityReference = new LegalEntityReference(item); } } } XmlNodeList creditEventsNodeList = xmlNode.SelectNodes("creditEvents"); if (creditEventsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in creditEventsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { creditEventsIDRef = item.Attributes["id"].Name; CreditEvents ob = CreditEvents(); IDManager.SetID(creditEventsIDRef, ob); } else if (item.Attributes.ToString() == "href") { creditEventsIDRef = item.Attributes["href"].Name; } else { creditEvents = new CreditEvents(item); } } } XmlNodeList seniorityNodeList = xmlNode.SelectNodes("seniority"); if (seniorityNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in seniorityNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { seniorityIDRef = item.Attributes["id"].Name; CreditSeniority ob = CreditSeniority(); IDManager.SetID(seniorityIDRef, ob); } else if (item.Attributes.ToString() == "href") { seniorityIDRef = item.Attributes["href"].Name; } else { seniority = new CreditSeniority(item); } } } XmlNodeList securedNodeList = xmlNode.SelectNodes("secured"); if (securedNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in securedNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { securedIDRef = item.Attributes["id"].Name; XsdTypeBoolean ob = XsdTypeBoolean(); IDManager.SetID(securedIDRef, ob); } else if (item.Attributes.ToString() == "href") { securedIDRef = item.Attributes["href"].Name; } else { secured = new XsdTypeBoolean(item); } } } XmlNodeList obligationCurrencyNodeList = xmlNode.SelectNodes("obligationCurrency"); if (obligationCurrencyNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationCurrencyNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationCurrencyIDRef = item.Attributes["id"].Name; Currency ob = Currency(); IDManager.SetID(obligationCurrencyIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationCurrencyIDRef = item.Attributes["href"].Name; } else { obligationCurrency = new Currency(item); } } } XmlNodeList obligationsNodeList = xmlNode.SelectNodes("obligations"); if (obligationsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in obligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { obligationsIDRef = item.Attributes["id"].Name; Obligations ob = Obligations(); IDManager.SetID(obligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { obligationsIDRef = item.Attributes["href"].Name; } else { obligations = new Obligations(item); } } } XmlNodeList deliverableObligationsNodeList = xmlNode.SelectNodes("deliverableObligations"); if (deliverableObligationsNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in deliverableObligationsNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { deliverableObligationsIDRef = item.Attributes["id"].Name; DeliverableObligations ob = DeliverableObligations(); IDManager.SetID(deliverableObligationsIDRef, ob); } else if (item.Attributes.ToString() == "href") { deliverableObligationsIDRef = item.Attributes["href"].Name; } else { deliverableObligations = new DeliverableObligations(item); } } } }