public InstrumentTradePrincipal(XmlNode xmlNode) { XmlNodeList principalAmountNodeList = xmlNode.SelectNodes("principalAmount"); if (principalAmountNodeList.Count > 1 ) { throw new Exception(); } foreach (XmlNode item in principalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { principalAmountIDRef = item.Attributes["id"].Name; NetAndGross ob = NetAndGross(); IDManager.SetID(principalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { principalAmountIDRef = item.Attributes["href"].Name; } else { principalAmount = new NetAndGross(item); } } } }
public InstrumentTradePrincipal(XmlNode xmlNode) { XmlNodeList principalAmountNodeList = xmlNode.SelectNodes("principalAmount"); if (principalAmountNodeList.Count > 1) { throw new Exception(); } foreach (XmlNode item in principalAmountNodeList) { if (item.Attributes["href"] != null || item.Attributes["id"] == null) { if (item.Attributes["id"] != null) { principalAmountIDRef = item.Attributes["id"].Name; NetAndGross ob = NetAndGross(); IDManager.SetID(principalAmountIDRef, ob); } else if (item.Attributes.ToString() == "href") { principalAmountIDRef = item.Attributes["href"].Name; } else { principalAmount = new NetAndGross(item); } } } }
public InstrumentTradePrincipal(XmlNode xmlNode) { XmlNode principalAmountNode = xmlNode.SelectSingleNode("principalAmount"); if (principalAmountNode != null) { if (principalAmountNode.Attributes["href"] != null || principalAmountNode.Attributes["id"] != null) { if (principalAmountNode.Attributes["id"] != null) { principalAmountIDRef_ = principalAmountNode.Attributes["id"].Value; NetAndGross ob = new NetAndGross(principalAmountNode); IDManager.SetID(principalAmountIDRef_, ob); } else if (principalAmountNode.Attributes["href"] != null) { principalAmountIDRef_ = principalAmountNode.Attributes["href"].Value; } else { principalAmount_ = new NetAndGross(principalAmountNode); } } else { principalAmount_ = new NetAndGross(principalAmountNode); } } }