public SwapPayoffInfo(XmlNode xmlNode) : base(xmlNode) { XmlNode typeNode = xmlNode.SelectSingleNode("type"); if (typeNode != null) { if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) { if (typeNode.Attributes["id"] != null) { typeIDRef_ = typeNode.Attributes["id"].Value; XsdTypeToken ob = new XsdTypeToken(typeNode); IDManager.SetID(typeIDRef_, ob); } else if (typeNode.Attributes["href"] != null) { typeIDRef_ = typeNode.Attributes["href"].Value; } else { type_ = new XsdTypeToken(typeNode); } } else { type_ = new XsdTypeToken(typeNode); } } XmlNode vanillaSwapPayoffNode = xmlNode.SelectSingleNode("vanillaSwapPayoff"); if (vanillaSwapPayoffNode != null) { if (vanillaSwapPayoffNode.Attributes["href"] != null || vanillaSwapPayoffNode.Attributes["id"] != null) { if (vanillaSwapPayoffNode.Attributes["id"] != null) { vanillaSwapPayoffIDRef_ = vanillaSwapPayoffNode.Attributes["id"].Value; VanillaSwapPayoff ob = new VanillaSwapPayoff(vanillaSwapPayoffNode); IDManager.SetID(vanillaSwapPayoffIDRef_, ob); } else if (vanillaSwapPayoffNode.Attributes["href"] != null) { vanillaSwapPayoffIDRef_ = vanillaSwapPayoffNode.Attributes["href"].Value; } else { vanillaSwapPayoff_ = new VanillaSwapPayoff(vanillaSwapPayoffNode); } } else { vanillaSwapPayoff_ = new VanillaSwapPayoff(vanillaSwapPayoffNode); } } XmlNode autoCallableSwapPayoffNode = xmlNode.SelectSingleNode("autoCallableSwapPayoff"); if (autoCallableSwapPayoffNode != null) { if (autoCallableSwapPayoffNode.Attributes["href"] != null || autoCallableSwapPayoffNode.Attributes["id"] != null) { if (autoCallableSwapPayoffNode.Attributes["id"] != null) { autoCallableSwapPayoffIDRef_ = autoCallableSwapPayoffNode.Attributes["id"].Value; AutoCallableSwapPayoff ob = new AutoCallableSwapPayoff(autoCallableSwapPayoffNode); IDManager.SetID(autoCallableSwapPayoffIDRef_, ob); } else if (autoCallableSwapPayoffNode.Attributes["href"] != null) { autoCallableSwapPayoffIDRef_ = autoCallableSwapPayoffNode.Attributes["href"].Value; } else { autoCallableSwapPayoff_ = new AutoCallableSwapPayoff(autoCallableSwapPayoffNode); } } else { autoCallableSwapPayoff_ = new AutoCallableSwapPayoff(autoCallableSwapPayoffNode); } } }