public CreditDefaultSwap(XmlNode xmlNode) : base(xmlNode) { XmlNode referenceInformationListNode = xmlNode.SelectSingleNode("referenceInformationList"); if (referenceInformationListNode != null) { if (referenceInformationListNode.Attributes["href"] != null || referenceInformationListNode.Attributes["id"] != null) { if (referenceInformationListNode.Attributes["id"] != null) { referenceInformationListIDRef_ = referenceInformationListNode.Attributes["id"].Value; ReferenceInformationList ob = new ReferenceInformationList(referenceInformationListNode); IDManager.SetID(referenceInformationListIDRef_, ob); } else if (referenceInformationListNode.Attributes["href"] != null) { referenceInformationListIDRef_ = referenceInformationListNode.Attributes["href"].Value; } else { referenceInformationList_ = new ReferenceInformationList(referenceInformationListNode); } } else { referenceInformationList_ = new ReferenceInformationList(referenceInformationListNode); } } XmlNode protectionTermsNode = xmlNode.SelectSingleNode("protectionTerms"); if (protectionTermsNode != null) { if (protectionTermsNode.Attributes["href"] != null || protectionTermsNode.Attributes["id"] != null) { if (protectionTermsNode.Attributes["id"] != null) { protectionTermsIDRef_ = protectionTermsNode.Attributes["id"].Value; ProtectionTerms ob = new ProtectionTerms(protectionTermsNode); IDManager.SetID(protectionTermsIDRef_, ob); } else if (protectionTermsNode.Attributes["href"] != null) { protectionTermsIDRef_ = protectionTermsNode.Attributes["href"].Value; } else { protectionTerms_ = new ProtectionTerms(protectionTermsNode); } } else { protectionTerms_ = new ProtectionTerms(protectionTermsNode); } } XmlNode swapStreamNode = xmlNode.SelectSingleNode("swapStream"); if (swapStreamNode != null) { if (swapStreamNode.Attributes["href"] != null || swapStreamNode.Attributes["id"] != null) { if (swapStreamNode.Attributes["id"] != null) { swapStreamIDRef_ = swapStreamNode.Attributes["id"].Value; SwapStream ob = new SwapStream(swapStreamNode); IDManager.SetID(swapStreamIDRef_, ob); } else if (swapStreamNode.Attributes["href"] != null) { swapStreamIDRef_ = swapStreamNode.Attributes["href"].Value; } else { swapStream_ = new SwapStream(swapStreamNode); } } else { swapStream_ = new SwapStream(swapStreamNode); } } }