public ForwardSale(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 underlyingAssetNode = xmlNode.SelectSingleNode("underlyingAsset");
     
     if (underlyingAssetNode != null)
     {
         if (underlyingAssetNode.Attributes["href"] != null || underlyingAssetNode.Attributes["id"] != null) 
         {
             if (underlyingAssetNode.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["id"].Value;
                 Asset ob = new Asset(underlyingAssetNode);
                 IDManager.SetID(underlyingAssetIDRef_, ob);
             }
             else if (underlyingAssetNode.Attributes["href"] != null)
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["href"].Value;
             }
             else
             {
                 underlyingAsset_ = new Asset(underlyingAssetNode);
             }
         }
         else
         {
             underlyingAsset_ = new Asset(underlyingAssetNode);
         }
     }
     
 
     XmlNode basketNode = xmlNode.SelectSingleNode("basket");
     
     if (basketNode != null)
     {
         if (basketNode.Attributes["href"] != null || basketNode.Attributes["id"] != null) 
         {
             if (basketNode.Attributes["id"] != null) 
             {
                 basketIDRef_ = basketNode.Attributes["id"].Value;
                 Basket ob = new Basket(basketNode);
                 IDManager.SetID(basketIDRef_, ob);
             }
             else if (basketNode.Attributes["href"] != null)
             {
                 basketIDRef_ = basketNode.Attributes["href"].Value;
             }
             else
             {
                 basket_ = new Basket(basketNode);
             }
         }
         else
         {
             basket_ = new Basket(basketNode);
         }
     }
     
 
     XmlNode bondNode = xmlNode.SelectSingleNode("bond");
     
     if (bondNode != null)
     {
         if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) 
         {
             if (bondNode.Attributes["id"] != null) 
             {
                 bondIDRef_ = bondNode.Attributes["id"].Value;
                 Bond ob = new Bond(bondNode);
                 IDManager.SetID(bondIDRef_, ob);
             }
             else if (bondNode.Attributes["href"] != null)
             {
                 bondIDRef_ = bondNode.Attributes["href"].Value;
             }
             else
             {
                 bond_ = new Bond(bondNode);
             }
         }
         else
         {
             bond_ = new Bond(bondNode);
         }
     }
     
 
     XmlNode cashNode = xmlNode.SelectSingleNode("cash");
     
     if (cashNode != null)
     {
         if (cashNode.Attributes["href"] != null || cashNode.Attributes["id"] != null) 
         {
             if (cashNode.Attributes["id"] != null) 
             {
                 cashIDRef_ = cashNode.Attributes["id"].Value;
                 Cash ob = new Cash(cashNode);
                 IDManager.SetID(cashIDRef_, ob);
             }
             else if (cashNode.Attributes["href"] != null)
             {
                 cashIDRef_ = cashNode.Attributes["href"].Value;
             }
             else
             {
                 cash_ = new Cash(cashNode);
             }
         }
         else
         {
             cash_ = new Cash(cashNode);
         }
     }
     
 
     XmlNode commodityNode = xmlNode.SelectSingleNode("commodity");
     
     if (commodityNode != null)
     {
         if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) 
         {
             if (commodityNode.Attributes["id"] != null) 
             {
                 commodityIDRef_ = commodityNode.Attributes["id"].Value;
                 Commodity ob = new Commodity(commodityNode);
                 IDManager.SetID(commodityIDRef_, ob);
             }
             else if (commodityNode.Attributes["href"] != null)
             {
                 commodityIDRef_ = commodityNode.Attributes["href"].Value;
             }
             else
             {
                 commodity_ = new Commodity(commodityNode);
             }
         }
         else
         {
             commodity_ = new Commodity(commodityNode);
         }
     }
     
 
     XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");
     
     if (convertibleBondNode != null)
     {
         if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) 
         {
             if (convertibleBondNode.Attributes["id"] != null) 
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                 ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                 IDManager.SetID(convertibleBondIDRef_, ob);
             }
             else if (convertibleBondNode.Attributes["href"] != null)
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
             }
             else
             {
                 convertibleBond_ = new ConvertibleBond(convertibleBondNode);
             }
         }
         else
         {
             convertibleBond_ = new ConvertibleBond(convertibleBondNode);
         }
     }
     
 
     XmlNode equityNode = xmlNode.SelectSingleNode("equity");
     
     if (equityNode != null)
     {
         if (equityNode.Attributes["href"] != null || equityNode.Attributes["id"] != null) 
         {
             if (equityNode.Attributes["id"] != null) 
             {
                 equityIDRef_ = equityNode.Attributes["id"].Value;
                 EquityAsset ob = new EquityAsset(equityNode);
                 IDManager.SetID(equityIDRef_, ob);
             }
             else if (equityNode.Attributes["href"] != null)
             {
                 equityIDRef_ = equityNode.Attributes["href"].Value;
             }
             else
             {
                 equity_ = new EquityAsset(equityNode);
             }
         }
         else
         {
             equity_ = new EquityAsset(equityNode);
         }
     }
     
 
     XmlNode exchangeTradedFundNode = xmlNode.SelectSingleNode("exchangeTradedFund");
     
     if (exchangeTradedFundNode != null)
     {
         if (exchangeTradedFundNode.Attributes["href"] != null || exchangeTradedFundNode.Attributes["id"] != null) 
         {
             if (exchangeTradedFundNode.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["id"].Value;
                 ExchangeTradedFund ob = new ExchangeTradedFund(exchangeTradedFundNode);
                 IDManager.SetID(exchangeTradedFundIDRef_, ob);
             }
             else if (exchangeTradedFundNode.Attributes["href"] != null)
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
             }
         }
         else
         {
             exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
         }
     }
     
 
     XmlNode futureNode = xmlNode.SelectSingleNode("future");
     
     if (futureNode != null)
     {
         if (futureNode.Attributes["href"] != null || futureNode.Attributes["id"] != null) 
         {
             if (futureNode.Attributes["id"] != null) 
             {
                 futureIDRef_ = futureNode.Attributes["id"].Value;
                 Future ob = new Future(futureNode);
                 IDManager.SetID(futureIDRef_, ob);
             }
             else if (futureNode.Attributes["href"] != null)
             {
                 futureIDRef_ = futureNode.Attributes["href"].Value;
             }
             else
             {
                 future_ = new Future(futureNode);
             }
         }
         else
         {
             future_ = new Future(futureNode);
         }
     }
     
 
     XmlNode indexNode = xmlNode.SelectSingleNode("index");
     
     if (indexNode != null)
     {
         if (indexNode.Attributes["href"] != null || indexNode.Attributes["id"] != null) 
         {
             if (indexNode.Attributes["id"] != null) 
             {
                 indexIDRef_ = indexNode.Attributes["id"].Value;
                 Index ob = new Index(indexNode);
                 IDManager.SetID(indexIDRef_, ob);
             }
             else if (indexNode.Attributes["href"] != null)
             {
                 indexIDRef_ = indexNode.Attributes["href"].Value;
             }
             else
             {
                 index_ = new Index(indexNode);
             }
         }
         else
         {
             index_ = new Index(indexNode);
         }
     }
     
 
     XmlNode loanNode = xmlNode.SelectSingleNode("loan");
     
     if (loanNode != null)
     {
         if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) 
         {
             if (loanNode.Attributes["id"] != null) 
             {
                 loanIDRef_ = loanNode.Attributes["id"].Value;
                 Loan ob = new Loan(loanNode);
                 IDManager.SetID(loanIDRef_, ob);
             }
             else if (loanNode.Attributes["href"] != null)
             {
                 loanIDRef_ = loanNode.Attributes["href"].Value;
             }
             else
             {
                 loan_ = new Loan(loanNode);
             }
         }
         else
         {
             loan_ = new Loan(loanNode);
         }
     }
     
 
     XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");
     
     if (mortgageNode != null)
     {
         if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) 
         {
             if (mortgageNode.Attributes["id"] != null) 
             {
                 mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                 Mortgage ob = new Mortgage(mortgageNode);
                 IDManager.SetID(mortgageIDRef_, ob);
             }
             else if (mortgageNode.Attributes["href"] != null)
             {
                 mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
             }
             else
             {
                 mortgage_ = new Mortgage(mortgageNode);
             }
         }
         else
         {
             mortgage_ = new Mortgage(mortgageNode);
         }
     }
     
 
     XmlNode mutualFundNode = xmlNode.SelectSingleNode("mutualFund");
     
     if (mutualFundNode != null)
     {
         if (mutualFundNode.Attributes["href"] != null || mutualFundNode.Attributes["id"] != null) 
         {
             if (mutualFundNode.Attributes["id"] != null) 
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["id"].Value;
                 MutualFund ob = new MutualFund(mutualFundNode);
                 IDManager.SetID(mutualFundIDRef_, ob);
             }
             else if (mutualFundNode.Attributes["href"] != null)
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["href"].Value;
             }
             else
             {
                 mutualFund_ = new MutualFund(mutualFundNode);
             }
         }
         else
         {
             mutualFund_ = new MutualFund(mutualFundNode);
         }
     }
     
 
     XmlNode forwardSaleDateNode = xmlNode.SelectSingleNode("forwardSaleDate");
     
     if (forwardSaleDateNode != null)
     {
         if (forwardSaleDateNode.Attributes["href"] != null || forwardSaleDateNode.Attributes["id"] != null) 
         {
             if (forwardSaleDateNode.Attributes["id"] != null) 
             {
                 forwardSaleDateIDRef_ = forwardSaleDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(forwardSaleDateNode);
                 IDManager.SetID(forwardSaleDateIDRef_, ob);
             }
             else if (forwardSaleDateNode.Attributes["href"] != null)
             {
                 forwardSaleDateIDRef_ = forwardSaleDateNode.Attributes["href"].Value;
             }
             else
             {
                 forwardSaleDate_ = new XsdTypeDate(forwardSaleDateNode);
             }
         }
         else
         {
             forwardSaleDate_ = new XsdTypeDate(forwardSaleDateNode);
         }
     }
     
 
     XmlNode settlementNode = xmlNode.SelectSingleNode("settlement");
     
     if (settlementNode != null)
     {
         if (settlementNode.Attributes["href"] != null || settlementNode.Attributes["id"] != null) 
         {
             if (settlementNode.Attributes["id"] != null) 
             {
                 settlementIDRef_ = settlementNode.Attributes["id"].Value;
                 Payment ob = new Payment(settlementNode);
                 IDManager.SetID(settlementIDRef_, ob);
             }
             else if (settlementNode.Attributes["href"] != null)
             {
                 settlementIDRef_ = settlementNode.Attributes["href"].Value;
             }
             else
             {
                 settlement_ = new Payment(settlementNode);
             }
         }
         else
         {
             settlement_ = new Payment(settlementNode);
         }
     }
     
 
     XmlNode priceNode = xmlNode.SelectSingleNode("price");
     
     if (priceNode != null)
     {
         if (priceNode.Attributes["href"] != null || priceNode.Attributes["id"] != null) 
         {
             if (priceNode.Attributes["id"] != null) 
             {
                 priceIDRef_ = priceNode.Attributes["id"].Value;
                 Price ob = new Price(priceNode);
                 IDManager.SetID(priceIDRef_, ob);
             }
             else if (priceNode.Attributes["href"] != null)
             {
                 priceIDRef_ = priceNode.Attributes["href"].Value;
             }
             else
             {
                 price_ = new Price(priceNode);
             }
         }
         else
         {
             price_ = new Price(priceNode);
         }
     }
     
 
 }
 public BasketConstituent(XmlNode xmlNode)
 {
     XmlNode underlyingAssetNode = xmlNode.SelectSingleNode("underlyingAsset");
     
     if (underlyingAssetNode != null)
     {
         if (underlyingAssetNode.Attributes["href"] != null || underlyingAssetNode.Attributes["id"] != null) 
         {
             if (underlyingAssetNode.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["id"].Value;
                 Asset ob = new Asset(underlyingAssetNode);
                 IDManager.SetID(underlyingAssetIDRef_, ob);
             }
             else if (underlyingAssetNode.Attributes["href"] != null)
             {
                 underlyingAssetIDRef_ = underlyingAssetNode.Attributes["href"].Value;
             }
             else
             {
                 underlyingAsset_ = new Asset(underlyingAssetNode);
             }
         }
         else
         {
             underlyingAsset_ = new Asset(underlyingAssetNode);
         }
     }
     
 
     XmlNode basketNode = xmlNode.SelectSingleNode("basket");
     
     if (basketNode != null)
     {
         if (basketNode.Attributes["href"] != null || basketNode.Attributes["id"] != null) 
         {
             if (basketNode.Attributes["id"] != null) 
             {
                 basketIDRef_ = basketNode.Attributes["id"].Value;
                 Basket ob = new Basket(basketNode);
                 IDManager.SetID(basketIDRef_, ob);
             }
             else if (basketNode.Attributes["href"] != null)
             {
                 basketIDRef_ = basketNode.Attributes["href"].Value;
             }
             else
             {
                 basket_ = new Basket(basketNode);
             }
         }
         else
         {
             basket_ = new Basket(basketNode);
         }
     }
     
 
     XmlNode bondNode = xmlNode.SelectSingleNode("bond");
     
     if (bondNode != null)
     {
         if (bondNode.Attributes["href"] != null || bondNode.Attributes["id"] != null) 
         {
             if (bondNode.Attributes["id"] != null) 
             {
                 bondIDRef_ = bondNode.Attributes["id"].Value;
                 Bond ob = new Bond(bondNode);
                 IDManager.SetID(bondIDRef_, ob);
             }
             else if (bondNode.Attributes["href"] != null)
             {
                 bondIDRef_ = bondNode.Attributes["href"].Value;
             }
             else
             {
                 bond_ = new Bond(bondNode);
             }
         }
         else
         {
             bond_ = new Bond(bondNode);
         }
     }
     
 
     XmlNode cashNode = xmlNode.SelectSingleNode("cash");
     
     if (cashNode != null)
     {
         if (cashNode.Attributes["href"] != null || cashNode.Attributes["id"] != null) 
         {
             if (cashNode.Attributes["id"] != null) 
             {
                 cashIDRef_ = cashNode.Attributes["id"].Value;
                 Cash ob = new Cash(cashNode);
                 IDManager.SetID(cashIDRef_, ob);
             }
             else if (cashNode.Attributes["href"] != null)
             {
                 cashIDRef_ = cashNode.Attributes["href"].Value;
             }
             else
             {
                 cash_ = new Cash(cashNode);
             }
         }
         else
         {
             cash_ = new Cash(cashNode);
         }
     }
     
 
     XmlNode commodityNode = xmlNode.SelectSingleNode("commodity");
     
     if (commodityNode != null)
     {
         if (commodityNode.Attributes["href"] != null || commodityNode.Attributes["id"] != null) 
         {
             if (commodityNode.Attributes["id"] != null) 
             {
                 commodityIDRef_ = commodityNode.Attributes["id"].Value;
                 Commodity ob = new Commodity(commodityNode);
                 IDManager.SetID(commodityIDRef_, ob);
             }
             else if (commodityNode.Attributes["href"] != null)
             {
                 commodityIDRef_ = commodityNode.Attributes["href"].Value;
             }
             else
             {
                 commodity_ = new Commodity(commodityNode);
             }
         }
         else
         {
             commodity_ = new Commodity(commodityNode);
         }
     }
     
 
     XmlNode convertibleBondNode = xmlNode.SelectSingleNode("convertibleBond");
     
     if (convertibleBondNode != null)
     {
         if (convertibleBondNode.Attributes["href"] != null || convertibleBondNode.Attributes["id"] != null) 
         {
             if (convertibleBondNode.Attributes["id"] != null) 
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["id"].Value;
                 ConvertibleBond ob = new ConvertibleBond(convertibleBondNode);
                 IDManager.SetID(convertibleBondIDRef_, ob);
             }
             else if (convertibleBondNode.Attributes["href"] != null)
             {
                 convertibleBondIDRef_ = convertibleBondNode.Attributes["href"].Value;
             }
             else
             {
                 convertibleBond_ = new ConvertibleBond(convertibleBondNode);
             }
         }
         else
         {
             convertibleBond_ = new ConvertibleBond(convertibleBondNode);
         }
     }
     
 
     XmlNode equityNode = xmlNode.SelectSingleNode("equity");
     
     if (equityNode != null)
     {
         if (equityNode.Attributes["href"] != null || equityNode.Attributes["id"] != null) 
         {
             if (equityNode.Attributes["id"] != null) 
             {
                 equityIDRef_ = equityNode.Attributes["id"].Value;
                 EquityAsset ob = new EquityAsset(equityNode);
                 IDManager.SetID(equityIDRef_, ob);
             }
             else if (equityNode.Attributes["href"] != null)
             {
                 equityIDRef_ = equityNode.Attributes["href"].Value;
             }
             else
             {
                 equity_ = new EquityAsset(equityNode);
             }
         }
         else
         {
             equity_ = new EquityAsset(equityNode);
         }
     }
     
 
     XmlNode exchangeTradedFundNode = xmlNode.SelectSingleNode("exchangeTradedFund");
     
     if (exchangeTradedFundNode != null)
     {
         if (exchangeTradedFundNode.Attributes["href"] != null || exchangeTradedFundNode.Attributes["id"] != null) 
         {
             if (exchangeTradedFundNode.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["id"].Value;
                 ExchangeTradedFund ob = new ExchangeTradedFund(exchangeTradedFundNode);
                 IDManager.SetID(exchangeTradedFundIDRef_, ob);
             }
             else if (exchangeTradedFundNode.Attributes["href"] != null)
             {
                 exchangeTradedFundIDRef_ = exchangeTradedFundNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
             }
         }
         else
         {
             exchangeTradedFund_ = new ExchangeTradedFund(exchangeTradedFundNode);
         }
     }
     
 
     XmlNode futureNode = xmlNode.SelectSingleNode("future");
     
     if (futureNode != null)
     {
         if (futureNode.Attributes["href"] != null || futureNode.Attributes["id"] != null) 
         {
             if (futureNode.Attributes["id"] != null) 
             {
                 futureIDRef_ = futureNode.Attributes["id"].Value;
                 Future ob = new Future(futureNode);
                 IDManager.SetID(futureIDRef_, ob);
             }
             else if (futureNode.Attributes["href"] != null)
             {
                 futureIDRef_ = futureNode.Attributes["href"].Value;
             }
             else
             {
                 future_ = new Future(futureNode);
             }
         }
         else
         {
             future_ = new Future(futureNode);
         }
     }
     
 
     XmlNode indexNode = xmlNode.SelectSingleNode("index");
     
     if (indexNode != null)
     {
         if (indexNode.Attributes["href"] != null || indexNode.Attributes["id"] != null) 
         {
             if (indexNode.Attributes["id"] != null) 
             {
                 indexIDRef_ = indexNode.Attributes["id"].Value;
                 Index ob = new Index(indexNode);
                 IDManager.SetID(indexIDRef_, ob);
             }
             else if (indexNode.Attributes["href"] != null)
             {
                 indexIDRef_ = indexNode.Attributes["href"].Value;
             }
             else
             {
                 index_ = new Index(indexNode);
             }
         }
         else
         {
             index_ = new Index(indexNode);
         }
     }
     
 
     XmlNode loanNode = xmlNode.SelectSingleNode("loan");
     
     if (loanNode != null)
     {
         if (loanNode.Attributes["href"] != null || loanNode.Attributes["id"] != null) 
         {
             if (loanNode.Attributes["id"] != null) 
             {
                 loanIDRef_ = loanNode.Attributes["id"].Value;
                 Loan ob = new Loan(loanNode);
                 IDManager.SetID(loanIDRef_, ob);
             }
             else if (loanNode.Attributes["href"] != null)
             {
                 loanIDRef_ = loanNode.Attributes["href"].Value;
             }
             else
             {
                 loan_ = new Loan(loanNode);
             }
         }
         else
         {
             loan_ = new Loan(loanNode);
         }
     }
     
 
     XmlNode mortgageNode = xmlNode.SelectSingleNode("mortgage");
     
     if (mortgageNode != null)
     {
         if (mortgageNode.Attributes["href"] != null || mortgageNode.Attributes["id"] != null) 
         {
             if (mortgageNode.Attributes["id"] != null) 
             {
                 mortgageIDRef_ = mortgageNode.Attributes["id"].Value;
                 Mortgage ob = new Mortgage(mortgageNode);
                 IDManager.SetID(mortgageIDRef_, ob);
             }
             else if (mortgageNode.Attributes["href"] != null)
             {
                 mortgageIDRef_ = mortgageNode.Attributes["href"].Value;
             }
             else
             {
                 mortgage_ = new Mortgage(mortgageNode);
             }
         }
         else
         {
             mortgage_ = new Mortgage(mortgageNode);
         }
     }
     
 
     XmlNode mutualFundNode = xmlNode.SelectSingleNode("mutualFund");
     
     if (mutualFundNode != null)
     {
         if (mutualFundNode.Attributes["href"] != null || mutualFundNode.Attributes["id"] != null) 
         {
             if (mutualFundNode.Attributes["id"] != null) 
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["id"].Value;
                 MutualFund ob = new MutualFund(mutualFundNode);
                 IDManager.SetID(mutualFundIDRef_, ob);
             }
             else if (mutualFundNode.Attributes["href"] != null)
             {
                 mutualFundIDRef_ = mutualFundNode.Attributes["href"].Value;
             }
             else
             {
                 mutualFund_ = new MutualFund(mutualFundNode);
             }
         }
         else
         {
             mutualFund_ = new MutualFund(mutualFundNode);
         }
     }
     
 
     XmlNode constituentWeightNode = xmlNode.SelectSingleNode("constituentWeight");
     
     if (constituentWeightNode != null)
     {
         if (constituentWeightNode.Attributes["href"] != null || constituentWeightNode.Attributes["id"] != null) 
         {
             if (constituentWeightNode.Attributes["id"] != null) 
             {
                 constituentWeightIDRef_ = constituentWeightNode.Attributes["id"].Value;
                 ConstituentWeight ob = new ConstituentWeight(constituentWeightNode);
                 IDManager.SetID(constituentWeightIDRef_, ob);
             }
             else if (constituentWeightNode.Attributes["href"] != null)
             {
                 constituentWeightIDRef_ = constituentWeightNode.Attributes["href"].Value;
             }
             else
             {
                 constituentWeight_ = new ConstituentWeight(constituentWeightNode);
             }
         }
         else
         {
             constituentWeight_ = new ConstituentWeight(constituentWeightNode);
         }
     }
     
 
     XmlNode dividendPayoutNode = xmlNode.SelectSingleNode("dividendPayout");
     
     if (dividendPayoutNode != null)
     {
         if (dividendPayoutNode.Attributes["href"] != null || dividendPayoutNode.Attributes["id"] != null) 
         {
             if (dividendPayoutNode.Attributes["id"] != null) 
             {
                 dividendPayoutIDRef_ = dividendPayoutNode.Attributes["id"].Value;
                 DividendPayout ob = new DividendPayout(dividendPayoutNode);
                 IDManager.SetID(dividendPayoutIDRef_, ob);
             }
             else if (dividendPayoutNode.Attributes["href"] != null)
             {
                 dividendPayoutIDRef_ = dividendPayoutNode.Attributes["href"].Value;
             }
             else
             {
                 dividendPayout_ = new DividendPayout(dividendPayoutNode);
             }
         }
         else
         {
             dividendPayout_ = new DividendPayout(dividendPayoutNode);
         }
     }
     
 
     XmlNode underlyerPriceNode = xmlNode.SelectSingleNode("underlyerPrice");
     
     if (underlyerPriceNode != null)
     {
         if (underlyerPriceNode.Attributes["href"] != null || underlyerPriceNode.Attributes["id"] != null) 
         {
             if (underlyerPriceNode.Attributes["id"] != null) 
             {
                 underlyerPriceIDRef_ = underlyerPriceNode.Attributes["id"].Value;
                 Price ob = new Price(underlyerPriceNode);
                 IDManager.SetID(underlyerPriceIDRef_, ob);
             }
             else if (underlyerPriceNode.Attributes["href"] != null)
             {
                 underlyerPriceIDRef_ = underlyerPriceNode.Attributes["href"].Value;
             }
             else
             {
                 underlyerPrice_ = new Price(underlyerPriceNode);
             }
         }
         else
         {
             underlyerPrice_ = new Price(underlyerPriceNode);
         }
     }
     
 
     XmlNode underlyerNotionalNode = xmlNode.SelectSingleNode("underlyerNotional");
     
     if (underlyerNotionalNode != null)
     {
         if (underlyerNotionalNode.Attributes["href"] != null || underlyerNotionalNode.Attributes["id"] != null) 
         {
             if (underlyerNotionalNode.Attributes["id"] != null) 
             {
                 underlyerNotionalIDRef_ = underlyerNotionalNode.Attributes["id"].Value;
                 Money ob = new Money(underlyerNotionalNode);
                 IDManager.SetID(underlyerNotionalIDRef_, ob);
             }
             else if (underlyerNotionalNode.Attributes["href"] != null)
             {
                 underlyerNotionalIDRef_ = underlyerNotionalNode.Attributes["href"].Value;
             }
             else
             {
                 underlyerNotional_ = new Money(underlyerNotionalNode);
             }
         }
         else
         {
             underlyerNotional_ = new Money(underlyerNotionalNode);
         }
     }
     
 
     XmlNode underlyerSpreadNode = xmlNode.SelectSingleNode("underlyerSpread");
     
     if (underlyerSpreadNode != null)
     {
         if (underlyerSpreadNode.Attributes["href"] != null || underlyerSpreadNode.Attributes["id"] != null) 
         {
             if (underlyerSpreadNode.Attributes["id"] != null) 
             {
                 underlyerSpreadIDRef_ = underlyerSpreadNode.Attributes["id"].Value;
                 SpreadScheduleReference ob = new SpreadScheduleReference(underlyerSpreadNode);
                 IDManager.SetID(underlyerSpreadIDRef_, ob);
             }
             else if (underlyerSpreadNode.Attributes["href"] != null)
             {
                 underlyerSpreadIDRef_ = underlyerSpreadNode.Attributes["href"].Value;
             }
             else
             {
                 underlyerSpread_ = new SpreadScheduleReference(underlyerSpreadNode);
             }
         }
         else
         {
             underlyerSpread_ = new SpreadScheduleReference(underlyerSpreadNode);
         }
     }
     
 
     XmlNode couponPaymentNode = xmlNode.SelectSingleNode("couponPayment");
     
     if (couponPaymentNode != null)
     {
         if (couponPaymentNode.Attributes["href"] != null || couponPaymentNode.Attributes["id"] != null) 
         {
             if (couponPaymentNode.Attributes["id"] != null) 
             {
                 couponPaymentIDRef_ = couponPaymentNode.Attributes["id"].Value;
                 PendingPayment ob = new PendingPayment(couponPaymentNode);
                 IDManager.SetID(couponPaymentIDRef_, ob);
             }
             else if (couponPaymentNode.Attributes["href"] != null)
             {
                 couponPaymentIDRef_ = couponPaymentNode.Attributes["href"].Value;
             }
             else
             {
                 couponPayment_ = new PendingPayment(couponPaymentNode);
             }
         }
         else
         {
             couponPayment_ = new PendingPayment(couponPaymentNode);
         }
     }
     
 
 }
 public BasketConstituent(XmlNode xmlNode)
 {
     XmlNodeList underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset");
     if (underlyingAssetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyingAssetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef = item.Attributes["id"].Name;
                 Asset ob = Asset();
                 IDManager.SetID(underlyingAssetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyingAssetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyingAsset = new Asset(item);
             }
         }
     }
     
 
     XmlNodeList basketNodeList = xmlNode.SelectNodes("basket");
     if (basketNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketIDRef = item.Attributes["id"].Name;
                 Basket ob = Basket();
                 IDManager.SetID(basketIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basket = new Basket(item);
             }
         }
     }
     
 
     XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");
     if (bondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondIDRef = item.Attributes["id"].Name;
                 Bond ob = Bond();
                 IDManager.SetID(bondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bond = new Bond(item);
             }
         }
     }
     
 
     XmlNodeList cashNodeList = xmlNode.SelectNodes("cash");
     if (cashNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashIDRef = item.Attributes["id"].Name;
                 Cash ob = Cash();
                 IDManager.SetID(cashIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cash = new Cash(item);
             }
         }
     }
     
 
     XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");
     if (commodityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIDRef = item.Attributes["id"].Name;
                 Commodity ob = Commodity();
                 IDManager.SetID(commodityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodity = new Commodity(item);
             }
         }
     }
     
 
     XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");
     if (convertibleBondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in convertibleBondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 convertibleBondIDRef = item.Attributes["id"].Name;
                 ConvertibleBond ob = ConvertibleBond();
                 IDManager.SetID(convertibleBondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 convertibleBondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 convertibleBond = new ConvertibleBond(item);
             }
         }
     }
     
 
     XmlNodeList equityNodeList = xmlNode.SelectNodes("equity");
     if (equityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityIDRef = item.Attributes["id"].Name;
                 EquityAsset ob = EquityAsset();
                 IDManager.SetID(equityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equity = new EquityAsset(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund");
     if (exchangeTradedFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef = item.Attributes["id"].Name;
                 ExchangeTradedFund ob = ExchangeTradedFund();
                 IDManager.SetID(exchangeTradedFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedFund = new ExchangeTradedFund(item);
             }
         }
     }
     
 
     XmlNodeList futureNodeList = xmlNode.SelectNodes("future");
     if (futureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futureIDRef = item.Attributes["id"].Name;
                 Future ob = Future();
                 IDManager.SetID(futureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 future = new Future(item);
             }
         }
     }
     
 
     XmlNodeList indexNodeList = xmlNode.SelectNodes("index");
     if (indexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexIDRef = item.Attributes["id"].Name;
                 Index ob = Index();
                 IDManager.SetID(indexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 index = new Index(item);
             }
         }
     }
     
 
     XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");
     if (loanNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loanNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loanIDRef = item.Attributes["id"].Name;
                 Loan ob = Loan();
                 IDManager.SetID(loanIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loanIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loan = new Loan(item);
             }
         }
     }
     
 
     XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");
     if (mortgageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mortgageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mortgageIDRef = item.Attributes["id"].Name;
                 Mortgage ob = Mortgage();
                 IDManager.SetID(mortgageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mortgageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mortgage = new Mortgage(item);
             }
         }
     }
     
 
     XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund");
     if (mutualFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mutualFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mutualFundIDRef = item.Attributes["id"].Name;
                 MutualFund ob = MutualFund();
                 IDManager.SetID(mutualFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mutualFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mutualFund = new MutualFund(item);
             }
         }
     }
     
 
     XmlNodeList constituentWeightNodeList = xmlNode.SelectNodes("constituentWeight");
     if (constituentWeightNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in constituentWeightNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 constituentWeightIDRef = item.Attributes["id"].Name;
                 ConstituentWeight ob = ConstituentWeight();
                 IDManager.SetID(constituentWeightIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 constituentWeightIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 constituentWeight = new ConstituentWeight(item);
             }
         }
     }
     
 
     XmlNodeList dividendPayoutNodeList = xmlNode.SelectNodes("dividendPayout");
     if (dividendPayoutNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendPayoutNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendPayoutIDRef = item.Attributes["id"].Name;
                 DividendPayout ob = DividendPayout();
                 IDManager.SetID(dividendPayoutIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendPayoutIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendPayout = new DividendPayout(item);
             }
         }
     }
     
 
     XmlNodeList underlyerPriceNodeList = xmlNode.SelectNodes("underlyerPrice");
     if (underlyerPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerPriceIDRef = item.Attributes["id"].Name;
                 Price ob = Price();
                 IDManager.SetID(underlyerPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerPrice = new Price(item);
             }
         }
     }
     
 
     XmlNodeList underlyerNotionalNodeList = xmlNode.SelectNodes("underlyerNotional");
     if (underlyerNotionalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerNotionalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerNotionalIDRef = item.Attributes["id"].Name;
                 Money ob = Money();
                 IDManager.SetID(underlyerNotionalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerNotionalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerNotional = new Money(item);
             }
         }
     }
     
 
     XmlNodeList underlyerSpreadNodeList = xmlNode.SelectNodes("underlyerSpread");
     if (underlyerSpreadNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyerSpreadNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyerSpreadIDRef = item.Attributes["id"].Name;
                 SpreadScheduleReference ob = SpreadScheduleReference();
                 IDManager.SetID(underlyerSpreadIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyerSpreadIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyerSpread = new SpreadScheduleReference(item);
             }
         }
     }
     
 
     XmlNodeList couponPaymentNodeList = xmlNode.SelectNodes("couponPayment");
     if (couponPaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in couponPaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 couponPaymentIDRef = item.Attributes["id"].Name;
                 PendingPayment ob = PendingPayment();
                 IDManager.SetID(couponPaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 couponPaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 couponPayment = new PendingPayment(item);
             }
         }
     }
     
 
 }
 public ForwardSale(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 underlyingAssetNodeList = xmlNode.SelectNodes("underlyingAsset");
     if (underlyingAssetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in underlyingAssetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 underlyingAssetIDRef = item.Attributes["id"].Name;
                 Asset ob = Asset();
                 IDManager.SetID(underlyingAssetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 underlyingAssetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 underlyingAsset = new Asset(item);
             }
         }
     }
     
 
     XmlNodeList basketNodeList = xmlNode.SelectNodes("basket");
     if (basketNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in basketNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 basketIDRef = item.Attributes["id"].Name;
                 Basket ob = Basket();
                 IDManager.SetID(basketIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 basketIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 basket = new Basket(item);
             }
         }
     }
     
 
     XmlNodeList bondNodeList = xmlNode.SelectNodes("bond");
     if (bondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondIDRef = item.Attributes["id"].Name;
                 Bond ob = Bond();
                 IDManager.SetID(bondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bond = new Bond(item);
             }
         }
     }
     
 
     XmlNodeList cashNodeList = xmlNode.SelectNodes("cash");
     if (cashNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cashNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cashIDRef = item.Attributes["id"].Name;
                 Cash ob = Cash();
                 IDManager.SetID(cashIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cashIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 cash = new Cash(item);
             }
         }
     }
     
 
     XmlNodeList commodityNodeList = xmlNode.SelectNodes("commodity");
     if (commodityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityIDRef = item.Attributes["id"].Name;
                 Commodity ob = Commodity();
                 IDManager.SetID(commodityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodity = new Commodity(item);
             }
         }
     }
     
 
     XmlNodeList convertibleBondNodeList = xmlNode.SelectNodes("convertibleBond");
     if (convertibleBondNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in convertibleBondNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 convertibleBondIDRef = item.Attributes["id"].Name;
                 ConvertibleBond ob = ConvertibleBond();
                 IDManager.SetID(convertibleBondIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 convertibleBondIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 convertibleBond = new ConvertibleBond(item);
             }
         }
     }
     
 
     XmlNodeList equityNodeList = xmlNode.SelectNodes("equity");
     if (equityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityIDRef = item.Attributes["id"].Name;
                 EquityAsset ob = EquityAsset();
                 IDManager.SetID(equityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equity = new EquityAsset(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedFundNodeList = xmlNode.SelectNodes("exchangeTradedFund");
     if (exchangeTradedFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedFundIDRef = item.Attributes["id"].Name;
                 ExchangeTradedFund ob = ExchangeTradedFund();
                 IDManager.SetID(exchangeTradedFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedFund = new ExchangeTradedFund(item);
             }
         }
     }
     
 
     XmlNodeList futureNodeList = xmlNode.SelectNodes("future");
     if (futureNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in futureNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 futureIDRef = item.Attributes["id"].Name;
                 Future ob = Future();
                 IDManager.SetID(futureIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 futureIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 future = new Future(item);
             }
         }
     }
     
 
     XmlNodeList indexNodeList = xmlNode.SelectNodes("index");
     if (indexNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in indexNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 indexIDRef = item.Attributes["id"].Name;
                 Index ob = Index();
                 IDManager.SetID(indexIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 indexIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 index = new Index(item);
             }
         }
     }
     
 
     XmlNodeList loanNodeList = xmlNode.SelectNodes("loan");
     if (loanNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in loanNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 loanIDRef = item.Attributes["id"].Name;
                 Loan ob = Loan();
                 IDManager.SetID(loanIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 loanIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 loan = new Loan(item);
             }
         }
     }
     
 
     XmlNodeList mortgageNodeList = xmlNode.SelectNodes("mortgage");
     if (mortgageNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mortgageNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mortgageIDRef = item.Attributes["id"].Name;
                 Mortgage ob = Mortgage();
                 IDManager.SetID(mortgageIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mortgageIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mortgage = new Mortgage(item);
             }
         }
     }
     
 
     XmlNodeList mutualFundNodeList = xmlNode.SelectNodes("mutualFund");
     if (mutualFundNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mutualFundNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mutualFundIDRef = item.Attributes["id"].Name;
                 MutualFund ob = MutualFund();
                 IDManager.SetID(mutualFundIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mutualFundIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mutualFund = new MutualFund(item);
             }
         }
     }
     
 
     XmlNodeList forwardSaleDateNodeList = xmlNode.SelectNodes("forwardSaleDate");
     if (forwardSaleDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forwardSaleDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forwardSaleDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(forwardSaleDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forwardSaleDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forwardSaleDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList settlementNodeList = xmlNode.SelectNodes("settlement");
     if (settlementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(settlementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlement = new Payment(item);
             }
         }
     }
     
 
     XmlNodeList priceNodeList = xmlNode.SelectNodes("price");
     if (priceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in priceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 priceIDRef = item.Attributes["id"].Name;
                 Price ob = Price();
                 IDManager.SetID(priceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 priceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 price = new Price(item);
             }
         }
     }
     
 
 }