public CreditDefaultSwap(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode protectionPartNode = xmlNode.SelectSingleNode("protectionPart");
     
     if (protectionPartNode != null)
     {
         if (protectionPartNode.Attributes["href"] != null || protectionPartNode.Attributes["id"] != null) 
         {
             if (protectionPartNode.Attributes["id"] != null) 
             {
                 protectionPartIDRef_ = protectionPartNode.Attributes["id"].Value;
                 ProtectionPart ob = new ProtectionPart(protectionPartNode);
                 IDManager.SetID(protectionPartIDRef_, ob);
             }
             else if (protectionPartNode.Attributes["href"] != null)
             {
                 protectionPartIDRef_ = protectionPartNode.Attributes["href"].Value;
             }
             else
             {
                 protectionPart_ = new ProtectionPart(protectionPartNode);
             }
         }
         else
         {
             protectionPart_ = new ProtectionPart(protectionPartNode);
         }
     }
     
 
     XmlNode couponPartNode = xmlNode.SelectSingleNode("couponPart");
     
     if (couponPartNode != null)
     {
         if (couponPartNode.Attributes["href"] != null || couponPartNode.Attributes["id"] != null) 
         {
             if (couponPartNode.Attributes["id"] != null) 
             {
                 couponPartIDRef_ = couponPartNode.Attributes["id"].Value;
                 CouponPart ob = new CouponPart(couponPartNode);
                 IDManager.SetID(couponPartIDRef_, ob);
             }
             else if (couponPartNode.Attributes["href"] != null)
             {
                 couponPartIDRef_ = couponPartNode.Attributes["href"].Value;
             }
             else
             {
                 couponPart_ = new CouponPart(couponPartNode);
             }
         }
         else
         {
             couponPart_ = new CouponPart(couponPartNode);
         }
     }
     
 
 }
        public CreditDefaultSwap(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode protectionPartNode = xmlNode.SelectSingleNode("protectionPart");

            if (protectionPartNode != null)
            {
                if (protectionPartNode.Attributes["href"] != null || protectionPartNode.Attributes["id"] != null)
                {
                    if (protectionPartNode.Attributes["id"] != null)
                    {
                        protectionPartIDRef_ = protectionPartNode.Attributes["id"].Value;
                        ProtectionPart ob = new ProtectionPart(protectionPartNode);
                        IDManager.SetID(protectionPartIDRef_, ob);
                    }
                    else if (protectionPartNode.Attributes["href"] != null)
                    {
                        protectionPartIDRef_ = protectionPartNode.Attributes["href"].Value;
                    }
                    else
                    {
                        protectionPart_ = new ProtectionPart(protectionPartNode);
                    }
                }
                else
                {
                    protectionPart_ = new ProtectionPart(protectionPartNode);
                }
            }


            XmlNode couponPartNode = xmlNode.SelectSingleNode("couponPart");

            if (couponPartNode != null)
            {
                if (couponPartNode.Attributes["href"] != null || couponPartNode.Attributes["id"] != null)
                {
                    if (couponPartNode.Attributes["id"] != null)
                    {
                        couponPartIDRef_ = couponPartNode.Attributes["id"].Value;
                        CouponPart ob = new CouponPart(couponPartNode);
                        IDManager.SetID(couponPartIDRef_, ob);
                    }
                    else if (couponPartNode.Attributes["href"] != null)
                    {
                        couponPartIDRef_ = couponPartNode.Attributes["href"].Value;
                    }
                    else
                    {
                        couponPart_ = new CouponPart(couponPartNode);
                    }
                }
                else
                {
                    couponPart_ = new CouponPart(couponPartNode);
                }
            }
        }