public ReturnSwapBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");

            if (buyerPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in buyerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(buyerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        buyerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        buyerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");

            if (buyerAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in buyerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(buyerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        buyerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        buyerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");

            if (sellerPartyReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in sellerPartyReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(sellerPartyReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sellerPartyReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sellerPartyReference = new PartyReference(item);
                    }
                }
            }


            XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");

            if (sellerAccountReferenceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in sellerAccountReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                        AccountReference ob = AccountReference();
                        IDManager.SetID(sellerAccountReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        sellerAccountReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        sellerAccountReference = new AccountReference(item);
                    }
                }
            }


            XmlNodeList returnSwapLegNodeList = xmlNode.SelectNodes("returnSwapLeg");

            if (returnSwapLegNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in returnSwapLegNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        returnSwapLegIDRef = item.Attributes["id"].Name;
                        DirectionalLeg ob = DirectionalLeg();
                        IDManager.SetID(returnSwapLegIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        returnSwapLegIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        returnSwapLeg = new DirectionalLeg(item);
                    }
                }
            }


            XmlNodeList interestLegNodeList = xmlNode.SelectNodes("interestLeg");

            if (interestLegNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in interestLegNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        interestLegIDRef = item.Attributes["id"].Name;
                        InterestLeg ob = InterestLeg();
                        IDManager.SetID(interestLegIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        interestLegIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        interestLeg = new InterestLeg(item);
                    }
                }
            }


            XmlNodeList returnLegNodeList = xmlNode.SelectNodes("returnLeg");

            if (returnLegNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in returnLegNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        returnLegIDRef = item.Attributes["id"].Name;
                        ReturnLeg ob = ReturnLeg();
                        IDManager.SetID(returnLegIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        returnLegIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        returnLeg = new ReturnLeg(item);
                    }
                }
            }


            XmlNodeList principalExchangeFeaturesNodeList = xmlNode.SelectNodes("principalExchangeFeatures");

            if (principalExchangeFeaturesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in principalExchangeFeaturesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        principalExchangeFeaturesIDRef = item.Attributes["id"].Name;
                        PrincipalExchangeFeatures ob = PrincipalExchangeFeatures();
                        IDManager.SetID(principalExchangeFeaturesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        principalExchangeFeaturesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        principalExchangeFeatures = new PrincipalExchangeFeatures(item);
                    }
                }
            }
        }
 public ReturnSwapBase(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList buyerPartyReferenceNodeList = xmlNode.SelectNodes("buyerPartyReference");
     if (buyerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(buyerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList buyerAccountReferenceNodeList = xmlNode.SelectNodes("buyerAccountReference");
     if (buyerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in buyerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(buyerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 buyerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 buyerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerPartyReferenceNodeList = xmlNode.SelectNodes("sellerPartyReference");
     if (sellerPartyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(sellerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerPartyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList sellerAccountReferenceNodeList = xmlNode.SelectNodes("sellerAccountReference");
     if (sellerAccountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in sellerAccountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(sellerAccountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 sellerAccountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 sellerAccountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList returnSwapLegNodeList = xmlNode.SelectNodes("returnSwapLeg");
     if (returnSwapLegNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in returnSwapLegNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 returnSwapLegIDRef = item.Attributes["id"].Name;
                 DirectionalLeg ob = DirectionalLeg();
                 IDManager.SetID(returnSwapLegIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 returnSwapLegIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 returnSwapLeg = new DirectionalLeg(item);
             }
         }
     }
     
 
     XmlNodeList interestLegNodeList = xmlNode.SelectNodes("interestLeg");
     if (interestLegNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in interestLegNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 interestLegIDRef = item.Attributes["id"].Name;
                 InterestLeg ob = InterestLeg();
                 IDManager.SetID(interestLegIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 interestLegIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 interestLeg = new InterestLeg(item);
             }
         }
     }
     
 
     XmlNodeList returnLegNodeList = xmlNode.SelectNodes("returnLeg");
     if (returnLegNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in returnLegNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 returnLegIDRef = item.Attributes["id"].Name;
                 ReturnLeg ob = ReturnLeg();
                 IDManager.SetID(returnLegIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 returnLegIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 returnLeg = new ReturnLeg(item);
             }
         }
     }
     
 
     XmlNodeList principalExchangeFeaturesNodeList = xmlNode.SelectNodes("principalExchangeFeatures");
     if (principalExchangeFeaturesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in principalExchangeFeaturesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 principalExchangeFeaturesIDRef = item.Attributes["id"].Name;
                 PrincipalExchangeFeatures ob = PrincipalExchangeFeatures();
                 IDManager.SetID(principalExchangeFeaturesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 principalExchangeFeaturesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 principalExchangeFeatures = new PrincipalExchangeFeatures(item);
             }
         }
     }
     
 
 }
        public ReturnSwapBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");

            if (buyerPartyReferenceNode != null)
            {
                if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (buyerPartyReferenceNode.Attributes["id"] != null)
                    {
                        buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                        IDManager.SetID(buyerPartyReferenceIDRef_, ob);
                    }
                    else if (buyerPartyReferenceNode.Attributes["href"] != null)
                    {
                        buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
                    }
                }
                else
                {
                    buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
                }
            }


            XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");

            if (buyerAccountReferenceNode != null)
            {
                if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (buyerAccountReferenceNode.Attributes["id"] != null)
                    {
                        buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                        IDManager.SetID(buyerAccountReferenceIDRef_, ob);
                    }
                    else if (buyerAccountReferenceNode.Attributes["href"] != null)
                    {
                        buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
                    }
                }
                else
                {
                    buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
                }
            }


            XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");

            if (sellerPartyReferenceNode != null)
            {
                if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null)
                {
                    if (sellerPartyReferenceNode.Attributes["id"] != null)
                    {
                        sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                        IDManager.SetID(sellerPartyReferenceIDRef_, ob);
                    }
                    else if (sellerPartyReferenceNode.Attributes["href"] != null)
                    {
                        sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
                    }
                }
                else
                {
                    sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
                }
            }


            XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");

            if (sellerAccountReferenceNode != null)
            {
                if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null)
                {
                    if (sellerAccountReferenceNode.Attributes["id"] != null)
                    {
                        sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                        AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                        IDManager.SetID(sellerAccountReferenceIDRef_, ob);
                    }
                    else if (sellerAccountReferenceNode.Attributes["href"] != null)
                    {
                        sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
                    }
                }
                else
                {
                    sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
                }
            }


            XmlNode returnSwapLegNode = xmlNode.SelectSingleNode("returnSwapLeg");

            if (returnSwapLegNode != null)
            {
                if (returnSwapLegNode.Attributes["href"] != null || returnSwapLegNode.Attributes["id"] != null)
                {
                    if (returnSwapLegNode.Attributes["id"] != null)
                    {
                        returnSwapLegIDRef_ = returnSwapLegNode.Attributes["id"].Value;
                        DirectionalLeg ob = new DirectionalLeg(returnSwapLegNode);
                        IDManager.SetID(returnSwapLegIDRef_, ob);
                    }
                    else if (returnSwapLegNode.Attributes["href"] != null)
                    {
                        returnSwapLegIDRef_ = returnSwapLegNode.Attributes["href"].Value;
                    }
                    else
                    {
                        returnSwapLeg_ = new DirectionalLeg(returnSwapLegNode);
                    }
                }
                else
                {
                    returnSwapLeg_ = new DirectionalLeg(returnSwapLegNode);
                }
            }


            XmlNode interestLegNode = xmlNode.SelectSingleNode("interestLeg");

            if (interestLegNode != null)
            {
                if (interestLegNode.Attributes["href"] != null || interestLegNode.Attributes["id"] != null)
                {
                    if (interestLegNode.Attributes["id"] != null)
                    {
                        interestLegIDRef_ = interestLegNode.Attributes["id"].Value;
                        InterestLeg ob = new InterestLeg(interestLegNode);
                        IDManager.SetID(interestLegIDRef_, ob);
                    }
                    else if (interestLegNode.Attributes["href"] != null)
                    {
                        interestLegIDRef_ = interestLegNode.Attributes["href"].Value;
                    }
                    else
                    {
                        interestLeg_ = new InterestLeg(interestLegNode);
                    }
                }
                else
                {
                    interestLeg_ = new InterestLeg(interestLegNode);
                }
            }


            XmlNode returnLegNode = xmlNode.SelectSingleNode("returnLeg");

            if (returnLegNode != null)
            {
                if (returnLegNode.Attributes["href"] != null || returnLegNode.Attributes["id"] != null)
                {
                    if (returnLegNode.Attributes["id"] != null)
                    {
                        returnLegIDRef_ = returnLegNode.Attributes["id"].Value;
                        ReturnLeg ob = new ReturnLeg(returnLegNode);
                        IDManager.SetID(returnLegIDRef_, ob);
                    }
                    else if (returnLegNode.Attributes["href"] != null)
                    {
                        returnLegIDRef_ = returnLegNode.Attributes["href"].Value;
                    }
                    else
                    {
                        returnLeg_ = new ReturnLeg(returnLegNode);
                    }
                }
                else
                {
                    returnLeg_ = new ReturnLeg(returnLegNode);
                }
            }


            XmlNode principalExchangeFeaturesNode = xmlNode.SelectSingleNode("principalExchangeFeatures");

            if (principalExchangeFeaturesNode != null)
            {
                if (principalExchangeFeaturesNode.Attributes["href"] != null || principalExchangeFeaturesNode.Attributes["id"] != null)
                {
                    if (principalExchangeFeaturesNode.Attributes["id"] != null)
                    {
                        principalExchangeFeaturesIDRef_ = principalExchangeFeaturesNode.Attributes["id"].Value;
                        PrincipalExchangeFeatures ob = new PrincipalExchangeFeatures(principalExchangeFeaturesNode);
                        IDManager.SetID(principalExchangeFeaturesIDRef_, ob);
                    }
                    else if (principalExchangeFeaturesNode.Attributes["href"] != null)
                    {
                        principalExchangeFeaturesIDRef_ = principalExchangeFeaturesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        principalExchangeFeatures_ = new PrincipalExchangeFeatures(principalExchangeFeaturesNode);
                    }
                }
                else
                {
                    principalExchangeFeatures_ = new PrincipalExchangeFeatures(principalExchangeFeaturesNode);
                }
            }
        }
 public ReturnSwapBase(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode buyerPartyReferenceNode = xmlNode.SelectSingleNode("buyerPartyReference");
     
     if (buyerPartyReferenceNode != null)
     {
         if (buyerPartyReferenceNode.Attributes["href"] != null || buyerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (buyerPartyReferenceNode.Attributes["id"] != null) 
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(buyerPartyReferenceNode);
                 IDManager.SetID(buyerPartyReferenceIDRef_, ob);
             }
             else if (buyerPartyReferenceNode.Attributes["href"] != null)
             {
                 buyerPartyReferenceIDRef_ = buyerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
             }
         }
         else
         {
             buyerPartyReference_ = new PartyReference(buyerPartyReferenceNode);
         }
     }
     
 
     XmlNode buyerAccountReferenceNode = xmlNode.SelectSingleNode("buyerAccountReference");
     
     if (buyerAccountReferenceNode != null)
     {
         if (buyerAccountReferenceNode.Attributes["href"] != null || buyerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (buyerAccountReferenceNode.Attributes["id"] != null) 
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(buyerAccountReferenceNode);
                 IDManager.SetID(buyerAccountReferenceIDRef_, ob);
             }
             else if (buyerAccountReferenceNode.Attributes["href"] != null)
             {
                 buyerAccountReferenceIDRef_ = buyerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
             }
         }
         else
         {
             buyerAccountReference_ = new AccountReference(buyerAccountReferenceNode);
         }
     }
     
 
     XmlNode sellerPartyReferenceNode = xmlNode.SelectSingleNode("sellerPartyReference");
     
     if (sellerPartyReferenceNode != null)
     {
         if (sellerPartyReferenceNode.Attributes["href"] != null || sellerPartyReferenceNode.Attributes["id"] != null) 
         {
             if (sellerPartyReferenceNode.Attributes["id"] != null) 
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(sellerPartyReferenceNode);
                 IDManager.SetID(sellerPartyReferenceIDRef_, ob);
             }
             else if (sellerPartyReferenceNode.Attributes["href"] != null)
             {
                 sellerPartyReferenceIDRef_ = sellerPartyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
             }
         }
         else
         {
             sellerPartyReference_ = new PartyReference(sellerPartyReferenceNode);
         }
     }
     
 
     XmlNode sellerAccountReferenceNode = xmlNode.SelectSingleNode("sellerAccountReference");
     
     if (sellerAccountReferenceNode != null)
     {
         if (sellerAccountReferenceNode.Attributes["href"] != null || sellerAccountReferenceNode.Attributes["id"] != null) 
         {
             if (sellerAccountReferenceNode.Attributes["id"] != null) 
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(sellerAccountReferenceNode);
                 IDManager.SetID(sellerAccountReferenceIDRef_, ob);
             }
             else if (sellerAccountReferenceNode.Attributes["href"] != null)
             {
                 sellerAccountReferenceIDRef_ = sellerAccountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
             }
         }
         else
         {
             sellerAccountReference_ = new AccountReference(sellerAccountReferenceNode);
         }
     }
     
 
     XmlNode returnSwapLegNode = xmlNode.SelectSingleNode("returnSwapLeg");
     
     if (returnSwapLegNode != null)
     {
         if (returnSwapLegNode.Attributes["href"] != null || returnSwapLegNode.Attributes["id"] != null) 
         {
             if (returnSwapLegNode.Attributes["id"] != null) 
             {
                 returnSwapLegIDRef_ = returnSwapLegNode.Attributes["id"].Value;
                 DirectionalLeg ob = new DirectionalLeg(returnSwapLegNode);
                 IDManager.SetID(returnSwapLegIDRef_, ob);
             }
             else if (returnSwapLegNode.Attributes["href"] != null)
             {
                 returnSwapLegIDRef_ = returnSwapLegNode.Attributes["href"].Value;
             }
             else
             {
                 returnSwapLeg_ = new DirectionalLeg(returnSwapLegNode);
             }
         }
         else
         {
             returnSwapLeg_ = new DirectionalLeg(returnSwapLegNode);
         }
     }
     
 
     XmlNode interestLegNode = xmlNode.SelectSingleNode("interestLeg");
     
     if (interestLegNode != null)
     {
         if (interestLegNode.Attributes["href"] != null || interestLegNode.Attributes["id"] != null) 
         {
             if (interestLegNode.Attributes["id"] != null) 
             {
                 interestLegIDRef_ = interestLegNode.Attributes["id"].Value;
                 InterestLeg ob = new InterestLeg(interestLegNode);
                 IDManager.SetID(interestLegIDRef_, ob);
             }
             else if (interestLegNode.Attributes["href"] != null)
             {
                 interestLegIDRef_ = interestLegNode.Attributes["href"].Value;
             }
             else
             {
                 interestLeg_ = new InterestLeg(interestLegNode);
             }
         }
         else
         {
             interestLeg_ = new InterestLeg(interestLegNode);
         }
     }
     
 
     XmlNode returnLegNode = xmlNode.SelectSingleNode("returnLeg");
     
     if (returnLegNode != null)
     {
         if (returnLegNode.Attributes["href"] != null || returnLegNode.Attributes["id"] != null) 
         {
             if (returnLegNode.Attributes["id"] != null) 
             {
                 returnLegIDRef_ = returnLegNode.Attributes["id"].Value;
                 ReturnLeg ob = new ReturnLeg(returnLegNode);
                 IDManager.SetID(returnLegIDRef_, ob);
             }
             else if (returnLegNode.Attributes["href"] != null)
             {
                 returnLegIDRef_ = returnLegNode.Attributes["href"].Value;
             }
             else
             {
                 returnLeg_ = new ReturnLeg(returnLegNode);
             }
         }
         else
         {
             returnLeg_ = new ReturnLeg(returnLegNode);
         }
     }
     
 
     XmlNode principalExchangeFeaturesNode = xmlNode.SelectSingleNode("principalExchangeFeatures");
     
     if (principalExchangeFeaturesNode != null)
     {
         if (principalExchangeFeaturesNode.Attributes["href"] != null || principalExchangeFeaturesNode.Attributes["id"] != null) 
         {
             if (principalExchangeFeaturesNode.Attributes["id"] != null) 
             {
                 principalExchangeFeaturesIDRef_ = principalExchangeFeaturesNode.Attributes["id"].Value;
                 PrincipalExchangeFeatures ob = new PrincipalExchangeFeatures(principalExchangeFeaturesNode);
                 IDManager.SetID(principalExchangeFeaturesIDRef_, ob);
             }
             else if (principalExchangeFeaturesNode.Attributes["href"] != null)
             {
                 principalExchangeFeaturesIDRef_ = principalExchangeFeaturesNode.Attributes["href"].Value;
             }
             else
             {
                 principalExchangeFeatures_ = new PrincipalExchangeFeatures(principalExchangeFeaturesNode);
             }
         }
         else
         {
             principalExchangeFeatures_ = new PrincipalExchangeFeatures(principalExchangeFeaturesNode);
         }
     }
     
 
 }