public CommodityOption(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 optionTypeNode = xmlNode.SelectSingleNode("optionType");
     
     if (optionTypeNode != null)
     {
         if (optionTypeNode.Attributes["href"] != null || optionTypeNode.Attributes["id"] != null) 
         {
             if (optionTypeNode.Attributes["id"] != null) 
             {
                 optionTypeIDRef_ = optionTypeNode.Attributes["id"].Value;
                 PutCallEnum ob = new PutCallEnum(optionTypeNode);
                 IDManager.SetID(optionTypeIDRef_, ob);
             }
             else if (optionTypeNode.Attributes["href"] != null)
             {
                 optionTypeIDRef_ = optionTypeNode.Attributes["href"].Value;
             }
             else
             {
                 optionType_ = new PutCallEnum(optionTypeNode);
             }
         }
         else
         {
             optionType_ = new PutCallEnum(optionTypeNode);
         }
     }
     
 
     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 effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new AdjustableOrRelativeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");
     
     if (terminationDateNode != null)
     {
         if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) 
         {
             if (terminationDateNode.Attributes["id"] != null) 
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                 AdjustableOrRelativeDate ob = new AdjustableOrRelativeDate(terminationDateNode);
                 IDManager.SetID(terminationDateIDRef_, ob);
             }
             else if (terminationDateNode.Attributes["href"] != null)
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
             }
         }
         else
         {
             terminationDate_ = new AdjustableOrRelativeDate(terminationDateNode);
         }
     }
     
 
     XmlNode calculationPeriodsScheduleNode = xmlNode.SelectSingleNode("calculationPeriodsSchedule");
     
     if (calculationPeriodsScheduleNode != null)
     {
         if (calculationPeriodsScheduleNode.Attributes["href"] != null || calculationPeriodsScheduleNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsScheduleNode.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleIDRef_ = calculationPeriodsScheduleNode.Attributes["id"].Value;
                 CommodityCalculationPeriodsSchedule ob = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode);
                 IDManager.SetID(calculationPeriodsScheduleIDRef_, ob);
             }
             else if (calculationPeriodsScheduleNode.Attributes["href"] != null)
             {
                 calculationPeriodsScheduleIDRef_ = calculationPeriodsScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriodsSchedule_ = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode);
             }
         }
         else
         {
             calculationPeriodsSchedule_ = new CommodityCalculationPeriodsSchedule(calculationPeriodsScheduleNode);
         }
     }
     
 
     XmlNode calculationPeriodsNode = xmlNode.SelectSingleNode("calculationPeriods");
     
     if (calculationPeriodsNode != null)
     {
         if (calculationPeriodsNode.Attributes["href"] != null || calculationPeriodsNode.Attributes["id"] != null) 
         {
             if (calculationPeriodsNode.Attributes["id"] != null) 
             {
                 calculationPeriodsIDRef_ = calculationPeriodsNode.Attributes["id"].Value;
                 AdjustableDates ob = new AdjustableDates(calculationPeriodsNode);
                 IDManager.SetID(calculationPeriodsIDRef_, ob);
             }
             else if (calculationPeriodsNode.Attributes["href"] != null)
             {
                 calculationPeriodsIDRef_ = calculationPeriodsNode.Attributes["href"].Value;
             }
             else
             {
                 calculationPeriods_ = new AdjustableDates(calculationPeriodsNode);
             }
         }
         else
         {
             calculationPeriods_ = new AdjustableDates(calculationPeriodsNode);
         }
     }
     
 
     XmlNode pricingDatesNode = xmlNode.SelectSingleNode("pricingDates");
     
     if (pricingDatesNode != null)
     {
         if (pricingDatesNode.Attributes["href"] != null || pricingDatesNode.Attributes["id"] != null) 
         {
             if (pricingDatesNode.Attributes["id"] != null) 
             {
                 pricingDatesIDRef_ = pricingDatesNode.Attributes["id"].Value;
                 CommodityPricingDates ob = new CommodityPricingDates(pricingDatesNode);
                 IDManager.SetID(pricingDatesIDRef_, ob);
             }
             else if (pricingDatesNode.Attributes["href"] != null)
             {
                 pricingDatesIDRef_ = pricingDatesNode.Attributes["href"].Value;
             }
             else
             {
                 pricingDates_ = new CommodityPricingDates(pricingDatesNode);
             }
         }
         else
         {
             pricingDates_ = new CommodityPricingDates(pricingDatesNode);
         }
     }
     
 
     XmlNode averagingMethodNode = xmlNode.SelectSingleNode("averagingMethod");
     
     if (averagingMethodNode != null)
     {
         if (averagingMethodNode.Attributes["href"] != null || averagingMethodNode.Attributes["id"] != null) 
         {
             if (averagingMethodNode.Attributes["id"] != null) 
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["id"].Value;
                 AveragingMethodEnum ob = new AveragingMethodEnum(averagingMethodNode);
                 IDManager.SetID(averagingMethodIDRef_, ob);
             }
             else if (averagingMethodNode.Attributes["href"] != null)
             {
                 averagingMethodIDRef_ = averagingMethodNode.Attributes["href"].Value;
             }
             else
             {
                 averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
             }
         }
         else
         {
             averagingMethod_ = new AveragingMethodEnum(averagingMethodNode);
         }
     }
     
 
     XmlNode notionalQuantityScheduleNode = xmlNode.SelectSingleNode("notionalQuantitySchedule");
     
     if (notionalQuantityScheduleNode != null)
     {
         if (notionalQuantityScheduleNode.Attributes["href"] != null || notionalQuantityScheduleNode.Attributes["id"] != null) 
         {
             if (notionalQuantityScheduleNode.Attributes["id"] != null) 
             {
                 notionalQuantityScheduleIDRef_ = notionalQuantityScheduleNode.Attributes["id"].Value;
                 CommodityNotionalQuantitySchedule ob = new CommodityNotionalQuantitySchedule(notionalQuantityScheduleNode);
                 IDManager.SetID(notionalQuantityScheduleIDRef_, ob);
             }
             else if (notionalQuantityScheduleNode.Attributes["href"] != null)
             {
                 notionalQuantityScheduleIDRef_ = notionalQuantityScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 notionalQuantitySchedule_ = new CommodityNotionalQuantitySchedule(notionalQuantityScheduleNode);
             }
         }
         else
         {
             notionalQuantitySchedule_ = new CommodityNotionalQuantitySchedule(notionalQuantityScheduleNode);
         }
     }
     
 
     XmlNode notionalQuantityNode = xmlNode.SelectSingleNode("notionalQuantity");
     
     if (notionalQuantityNode != null)
     {
         if (notionalQuantityNode.Attributes["href"] != null || notionalQuantityNode.Attributes["id"] != null) 
         {
             if (notionalQuantityNode.Attributes["id"] != null) 
             {
                 notionalQuantityIDRef_ = notionalQuantityNode.Attributes["id"].Value;
                 CommodityNotionalQuantity ob = new CommodityNotionalQuantity(notionalQuantityNode);
                 IDManager.SetID(notionalQuantityIDRef_, ob);
             }
             else if (notionalQuantityNode.Attributes["href"] != null)
             {
                 notionalQuantityIDRef_ = notionalQuantityNode.Attributes["href"].Value;
             }
             else
             {
                 notionalQuantity_ = new CommodityNotionalQuantity(notionalQuantityNode);
             }
         }
         else
         {
             notionalQuantity_ = new CommodityNotionalQuantity(notionalQuantityNode);
         }
     }
     
 
     XmlNodeList settlementPeriodsNotionalQuantityNodeList = xmlNode.SelectNodes("settlementPeriodsNotionalQuantity");
     
     if (settlementPeriodsNotionalQuantityNodeList != null)
     {
         this.settlementPeriodsNotionalQuantity_ = new List<CommoditySettlementPeriodsNotionalQuantity>();
         foreach (XmlNode item in settlementPeriodsNotionalQuantityNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     settlementPeriodsNotionalQuantityIDRef_ = item.Attributes["id"].Value;
                     settlementPeriodsNotionalQuantity_.Add(new CommoditySettlementPeriodsNotionalQuantity(item));
                     IDManager.SetID(settlementPeriodsNotionalQuantityIDRef_, settlementPeriodsNotionalQuantity_[settlementPeriodsNotionalQuantity_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     settlementPeriodsNotionalQuantityIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 settlementPeriodsNotionalQuantity_.Add(new CommoditySettlementPeriodsNotionalQuantity(item));
                 }
             }
             else
             {
                 settlementPeriodsNotionalQuantity_.Add(new CommoditySettlementPeriodsNotionalQuantity(item));
             }
         }
     }
     
 
     XmlNode totalNotionalQuantityNode = xmlNode.SelectSingleNode("totalNotionalQuantity");
     
     if (totalNotionalQuantityNode != null)
     {
         if (totalNotionalQuantityNode.Attributes["href"] != null || totalNotionalQuantityNode.Attributes["id"] != null) 
         {
             if (totalNotionalQuantityNode.Attributes["id"] != null) 
             {
                 totalNotionalQuantityIDRef_ = totalNotionalQuantityNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(totalNotionalQuantityNode);
                 IDManager.SetID(totalNotionalQuantityIDRef_, ob);
             }
             else if (totalNotionalQuantityNode.Attributes["href"] != null)
             {
                 totalNotionalQuantityIDRef_ = totalNotionalQuantityNode.Attributes["href"].Value;
             }
             else
             {
                 totalNotionalQuantity_ = new XsdTypeDecimal(totalNotionalQuantityNode);
             }
         }
         else
         {
             totalNotionalQuantity_ = new XsdTypeDecimal(totalNotionalQuantityNode);
         }
     }
     
 
     XmlNode quantityReferenceNode = xmlNode.SelectSingleNode("quantityReference");
     
     if (quantityReferenceNode != null)
     {
         if (quantityReferenceNode.Attributes["href"] != null || quantityReferenceNode.Attributes["id"] != null) 
         {
             if (quantityReferenceNode.Attributes["id"] != null) 
             {
                 quantityReferenceIDRef_ = quantityReferenceNode.Attributes["id"].Value;
                 QuantityReference ob = new QuantityReference(quantityReferenceNode);
                 IDManager.SetID(quantityReferenceIDRef_, ob);
             }
             else if (quantityReferenceNode.Attributes["href"] != null)
             {
                 quantityReferenceIDRef_ = quantityReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 quantityReference_ = new QuantityReference(quantityReferenceNode);
             }
         }
         else
         {
             quantityReference_ = new QuantityReference(quantityReferenceNode);
         }
     }
     
 
     XmlNode exerciseNode = xmlNode.SelectSingleNode("exercise");
     
     if (exerciseNode != null)
     {
         if (exerciseNode.Attributes["href"] != null || exerciseNode.Attributes["id"] != null) 
         {
             if (exerciseNode.Attributes["id"] != null) 
             {
                 exerciseIDRef_ = exerciseNode.Attributes["id"].Value;
                 CommodityExercise ob = new CommodityExercise(exerciseNode);
                 IDManager.SetID(exerciseIDRef_, ob);
             }
             else if (exerciseNode.Attributes["href"] != null)
             {
                 exerciseIDRef_ = exerciseNode.Attributes["href"].Value;
             }
             else
             {
                 exercise_ = new CommodityExercise(exerciseNode);
             }
         }
         else
         {
             exercise_ = new CommodityExercise(exerciseNode);
         }
     }
     
 
     XmlNode strikePricePerUnitNode = xmlNode.SelectSingleNode("strikePricePerUnit");
     
     if (strikePricePerUnitNode != null)
     {
         if (strikePricePerUnitNode.Attributes["href"] != null || strikePricePerUnitNode.Attributes["id"] != null) 
         {
             if (strikePricePerUnitNode.Attributes["id"] != null) 
             {
                 strikePricePerUnitIDRef_ = strikePricePerUnitNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(strikePricePerUnitNode);
                 IDManager.SetID(strikePricePerUnitIDRef_, ob);
             }
             else if (strikePricePerUnitNode.Attributes["href"] != null)
             {
                 strikePricePerUnitIDRef_ = strikePricePerUnitNode.Attributes["href"].Value;
             }
             else
             {
                 strikePricePerUnit_ = new NonNegativeMoney(strikePricePerUnitNode);
             }
         }
         else
         {
             strikePricePerUnit_ = new NonNegativeMoney(strikePricePerUnitNode);
         }
     }
     
 
     XmlNode strikePricePerUnitScheduleNode = xmlNode.SelectSingleNode("strikePricePerUnitSchedule");
     
     if (strikePricePerUnitScheduleNode != null)
     {
         if (strikePricePerUnitScheduleNode.Attributes["href"] != null || strikePricePerUnitScheduleNode.Attributes["id"] != null) 
         {
             if (strikePricePerUnitScheduleNode.Attributes["id"] != null) 
             {
                 strikePricePerUnitScheduleIDRef_ = strikePricePerUnitScheduleNode.Attributes["id"].Value;
                 CommodityStrikeSchedule ob = new CommodityStrikeSchedule(strikePricePerUnitScheduleNode);
                 IDManager.SetID(strikePricePerUnitScheduleIDRef_, ob);
             }
             else if (strikePricePerUnitScheduleNode.Attributes["href"] != null)
             {
                 strikePricePerUnitScheduleIDRef_ = strikePricePerUnitScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 strikePricePerUnitSchedule_ = new CommodityStrikeSchedule(strikePricePerUnitScheduleNode);
             }
         }
         else
         {
             strikePricePerUnitSchedule_ = new CommodityStrikeSchedule(strikePricePerUnitScheduleNode);
         }
     }
     
 
     XmlNode floatingStrikePricePerUnitNode = xmlNode.SelectSingleNode("floatingStrikePricePerUnit");
     
     if (floatingStrikePricePerUnitNode != null)
     {
         if (floatingStrikePricePerUnitNode.Attributes["href"] != null || floatingStrikePricePerUnitNode.Attributes["id"] != null) 
         {
             if (floatingStrikePricePerUnitNode.Attributes["id"] != null) 
             {
                 floatingStrikePricePerUnitIDRef_ = floatingStrikePricePerUnitNode.Attributes["id"].Value;
                 FloatingStrikePrice ob = new FloatingStrikePrice(floatingStrikePricePerUnitNode);
                 IDManager.SetID(floatingStrikePricePerUnitIDRef_, ob);
             }
             else if (floatingStrikePricePerUnitNode.Attributes["href"] != null)
             {
                 floatingStrikePricePerUnitIDRef_ = floatingStrikePricePerUnitNode.Attributes["href"].Value;
             }
             else
             {
                 floatingStrikePricePerUnit_ = new FloatingStrikePrice(floatingStrikePricePerUnitNode);
             }
         }
         else
         {
             floatingStrikePricePerUnit_ = new FloatingStrikePrice(floatingStrikePricePerUnitNode);
         }
     }
     
 
     XmlNode floatingStrikePricePerUnitScheduleNode = xmlNode.SelectSingleNode("floatingStrikePricePerUnitSchedule");
     
     if (floatingStrikePricePerUnitScheduleNode != null)
     {
         if (floatingStrikePricePerUnitScheduleNode.Attributes["href"] != null || floatingStrikePricePerUnitScheduleNode.Attributes["id"] != null) 
         {
             if (floatingStrikePricePerUnitScheduleNode.Attributes["id"] != null) 
             {
                 floatingStrikePricePerUnitScheduleIDRef_ = floatingStrikePricePerUnitScheduleNode.Attributes["id"].Value;
                 CommodityCalculationPeriodsSchedule ob = new CommodityCalculationPeriodsSchedule(floatingStrikePricePerUnitScheduleNode);
                 IDManager.SetID(floatingStrikePricePerUnitScheduleIDRef_, ob);
             }
             else if (floatingStrikePricePerUnitScheduleNode.Attributes["href"] != null)
             {
                 floatingStrikePricePerUnitScheduleIDRef_ = floatingStrikePricePerUnitScheduleNode.Attributes["href"].Value;
             }
             else
             {
                 floatingStrikePricePerUnitSchedule_ = new CommodityCalculationPeriodsSchedule(floatingStrikePricePerUnitScheduleNode);
             }
         }
         else
         {
             floatingStrikePricePerUnitSchedule_ = new CommodityCalculationPeriodsSchedule(floatingStrikePricePerUnitScheduleNode);
         }
     }
     
 
     XmlNode commoditySwapNode = xmlNode.SelectSingleNode("commoditySwap");
     
     if (commoditySwapNode != null)
     {
         if (commoditySwapNode.Attributes["href"] != null || commoditySwapNode.Attributes["id"] != null) 
         {
             if (commoditySwapNode.Attributes["id"] != null) 
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["id"].Value;
                 CommoditySwap ob = new CommoditySwap(commoditySwapNode);
                 IDManager.SetID(commoditySwapIDRef_, ob);
             }
             else if (commoditySwapNode.Attributes["href"] != null)
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwap_ = new CommoditySwap(commoditySwapNode);
             }
         }
         else
         {
             commoditySwap_ = new CommoditySwap(commoditySwapNode);
         }
     }
     
 
     XmlNode commodityForwardNode = xmlNode.SelectSingleNode("commodityForward");
     
     if (commodityForwardNode != null)
     {
         if (commodityForwardNode.Attributes["href"] != null || commodityForwardNode.Attributes["id"] != null) 
         {
             if (commodityForwardNode.Attributes["id"] != null) 
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["id"].Value;
                 CommodityForward ob = new CommodityForward(commodityForwardNode);
                 IDManager.SetID(commodityForwardIDRef_, ob);
             }
             else if (commodityForwardNode.Attributes["href"] != null)
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 commodityForward_ = new CommodityForward(commodityForwardNode);
             }
         }
         else
         {
             commodityForward_ = new CommodityForward(commodityForwardNode);
         }
     }
     
 
     XmlNode physicalExerciseNode = xmlNode.SelectSingleNode("physicalExercise");
     
     if (physicalExerciseNode != null)
     {
         if (physicalExerciseNode.Attributes["href"] != null || physicalExerciseNode.Attributes["id"] != null) 
         {
             if (physicalExerciseNode.Attributes["id"] != null) 
             {
                 physicalExerciseIDRef_ = physicalExerciseNode.Attributes["id"].Value;
                 CommodityPhysicalExercise ob = new CommodityPhysicalExercise(physicalExerciseNode);
                 IDManager.SetID(physicalExerciseIDRef_, ob);
             }
             else if (physicalExerciseNode.Attributes["href"] != null)
             {
                 physicalExerciseIDRef_ = physicalExerciseNode.Attributes["href"].Value;
             }
             else
             {
                 physicalExercise_ = new CommodityPhysicalExercise(physicalExerciseNode);
             }
         }
         else
         {
             physicalExercise_ = new CommodityPhysicalExercise(physicalExerciseNode);
         }
     }
     
 
     XmlNode weatherCalculationPeriodsNode = xmlNode.SelectSingleNode("weatherCalculationPeriods");
     
     if (weatherCalculationPeriodsNode != null)
     {
         if (weatherCalculationPeriodsNode.Attributes["href"] != null || weatherCalculationPeriodsNode.Attributes["id"] != null) 
         {
             if (weatherCalculationPeriodsNode.Attributes["id"] != null) 
             {
                 weatherCalculationPeriodsIDRef_ = weatherCalculationPeriodsNode.Attributes["id"].Value;
                 WeatherCalculationPeriods ob = new WeatherCalculationPeriods(weatherCalculationPeriodsNode);
                 IDManager.SetID(weatherCalculationPeriodsIDRef_, ob);
             }
             else if (weatherCalculationPeriodsNode.Attributes["href"] != null)
             {
                 weatherCalculationPeriodsIDRef_ = weatherCalculationPeriodsNode.Attributes["href"].Value;
             }
             else
             {
                 weatherCalculationPeriods_ = new WeatherCalculationPeriods(weatherCalculationPeriodsNode);
             }
         }
         else
         {
             weatherCalculationPeriods_ = new WeatherCalculationPeriods(weatherCalculationPeriodsNode);
         }
     }
     
 
     XmlNode weatherCalculationPeriodsReferenceNode = xmlNode.SelectSingleNode("weatherCalculationPeriodsReference");
     
     if (weatherCalculationPeriodsReferenceNode != null)
     {
         if (weatherCalculationPeriodsReferenceNode.Attributes["href"] != null || weatherCalculationPeriodsReferenceNode.Attributes["id"] != null) 
         {
             if (weatherCalculationPeriodsReferenceNode.Attributes["id"] != null) 
             {
                 weatherCalculationPeriodsReferenceIDRef_ = weatherCalculationPeriodsReferenceNode.Attributes["id"].Value;
                 CalculationPeriodsReference ob = new CalculationPeriodsReference(weatherCalculationPeriodsReferenceNode);
                 IDManager.SetID(weatherCalculationPeriodsReferenceIDRef_, ob);
             }
             else if (weatherCalculationPeriodsReferenceNode.Attributes["href"] != null)
             {
                 weatherCalculationPeriodsReferenceIDRef_ = weatherCalculationPeriodsReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 weatherCalculationPeriodsReference_ = new CalculationPeriodsReference(weatherCalculationPeriodsReferenceNode);
             }
         }
         else
         {
             weatherCalculationPeriodsReference_ = new CalculationPeriodsReference(weatherCalculationPeriodsReferenceNode);
         }
     }
     
 
     XmlNode weatherNotionalAmountNode = xmlNode.SelectSingleNode("weatherNotionalAmount");
     
     if (weatherNotionalAmountNode != null)
     {
         if (weatherNotionalAmountNode.Attributes["href"] != null || weatherNotionalAmountNode.Attributes["id"] != null) 
         {
             if (weatherNotionalAmountNode.Attributes["id"] != null) 
             {
                 weatherNotionalAmountIDRef_ = weatherNotionalAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(weatherNotionalAmountNode);
                 IDManager.SetID(weatherNotionalAmountIDRef_, ob);
             }
             else if (weatherNotionalAmountNode.Attributes["href"] != null)
             {
                 weatherNotionalAmountIDRef_ = weatherNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 weatherNotionalAmount_ = new NonNegativeMoney(weatherNotionalAmountNode);
             }
         }
         else
         {
             weatherNotionalAmount_ = new NonNegativeMoney(weatherNotionalAmountNode);
         }
     }
     
 
     XmlNode weatherIndexStrikeLevelNode = xmlNode.SelectSingleNode("weatherIndexStrikeLevel");
     
     if (weatherIndexStrikeLevelNode != null)
     {
         if (weatherIndexStrikeLevelNode.Attributes["href"] != null || weatherIndexStrikeLevelNode.Attributes["id"] != null) 
         {
             if (weatherIndexStrikeLevelNode.Attributes["id"] != null) 
             {
                 weatherIndexStrikeLevelIDRef_ = weatherIndexStrikeLevelNode.Attributes["id"].Value;
                 WeatherIndex ob = new WeatherIndex(weatherIndexStrikeLevelNode);
                 IDManager.SetID(weatherIndexStrikeLevelIDRef_, ob);
             }
             else if (weatherIndexStrikeLevelNode.Attributes["href"] != null)
             {
                 weatherIndexStrikeLevelIDRef_ = weatherIndexStrikeLevelNode.Attributes["href"].Value;
             }
             else
             {
                 weatherIndexStrikeLevel_ = new WeatherIndex(weatherIndexStrikeLevelNode);
             }
         }
         else
         {
             weatherIndexStrikeLevel_ = new WeatherIndex(weatherIndexStrikeLevelNode);
         }
     }
     
 
     XmlNode calculationNode = xmlNode.SelectSingleNode("calculation");
     
     if (calculationNode != null)
     {
         if (calculationNode.Attributes["href"] != null || calculationNode.Attributes["id"] != null) 
         {
             if (calculationNode.Attributes["id"] != null) 
             {
                 calculationIDRef_ = calculationNode.Attributes["id"].Value;
                 WeatherLegCalculation ob = new WeatherLegCalculation(calculationNode);
                 IDManager.SetID(calculationIDRef_, ob);
             }
             else if (calculationNode.Attributes["href"] != null)
             {
                 calculationIDRef_ = calculationNode.Attributes["href"].Value;
             }
             else
             {
                 calculation_ = new WeatherLegCalculation(calculationNode);
             }
         }
         else
         {
             calculation_ = new WeatherLegCalculation(calculationNode);
         }
     }
     
 
     XmlNode weatherIndexDataNode = xmlNode.SelectSingleNode("weatherIndexData");
     
     if (weatherIndexDataNode != null)
     {
         if (weatherIndexDataNode.Attributes["href"] != null || weatherIndexDataNode.Attributes["id"] != null) 
         {
             if (weatherIndexDataNode.Attributes["id"] != null) 
             {
                 weatherIndexDataIDRef_ = weatherIndexDataNode.Attributes["id"].Value;
                 WeatherIndexData ob = new WeatherIndexData(weatherIndexDataNode);
                 IDManager.SetID(weatherIndexDataIDRef_, ob);
             }
             else if (weatherIndexDataNode.Attributes["href"] != null)
             {
                 weatherIndexDataIDRef_ = weatherIndexDataNode.Attributes["href"].Value;
             }
             else
             {
                 weatherIndexData_ = new WeatherIndexData(weatherIndexDataNode);
             }
         }
         else
         {
             weatherIndexData_ = new WeatherIndexData(weatherIndexDataNode);
         }
     }
     
 
     XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");
     
     if (premiumNodeList != null)
     {
         this.premium_ = new List<CommodityPremium>();
         foreach (XmlNode item in premiumNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     premiumIDRef_ = item.Attributes["id"].Value;
                     premium_.Add(new CommodityPremium(item));
                     IDManager.SetID(premiumIDRef_, premium_[premium_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     premiumIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 premium_.Add(new CommodityPremium(item));
                 }
             }
             else
             {
                 premium_.Add(new CommodityPremium(item));
             }
         }
     }
     
 
     XmlNode commonPricingNode = xmlNode.SelectSingleNode("commonPricing");
     
     if (commonPricingNode != null)
     {
         if (commonPricingNode.Attributes["href"] != null || commonPricingNode.Attributes["id"] != null) 
         {
             if (commonPricingNode.Attributes["id"] != null) 
             {
                 commonPricingIDRef_ = commonPricingNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(commonPricingNode);
                 IDManager.SetID(commonPricingIDRef_, ob);
             }
             else if (commonPricingNode.Attributes["href"] != null)
             {
                 commonPricingIDRef_ = commonPricingNode.Attributes["href"].Value;
             }
             else
             {
                 commonPricing_ = new XsdTypeBoolean(commonPricingNode);
             }
         }
         else
         {
             commonPricing_ = new XsdTypeBoolean(commonPricingNode);
         }
     }
     
 
     XmlNode marketDisruptionNode = xmlNode.SelectSingleNode("marketDisruption");
     
     if (marketDisruptionNode != null)
     {
         if (marketDisruptionNode.Attributes["href"] != null || marketDisruptionNode.Attributes["id"] != null) 
         {
             if (marketDisruptionNode.Attributes["id"] != null) 
             {
                 marketDisruptionIDRef_ = marketDisruptionNode.Attributes["id"].Value;
                 CommodityMarketDisruption ob = new CommodityMarketDisruption(marketDisruptionNode);
                 IDManager.SetID(marketDisruptionIDRef_, ob);
             }
             else if (marketDisruptionNode.Attributes["href"] != null)
             {
                 marketDisruptionIDRef_ = marketDisruptionNode.Attributes["href"].Value;
             }
             else
             {
                 marketDisruption_ = new CommodityMarketDisruption(marketDisruptionNode);
             }
         }
         else
         {
             marketDisruption_ = new CommodityMarketDisruption(marketDisruptionNode);
         }
     }
     
 
     XmlNode settlementDisruptionNode = xmlNode.SelectSingleNode("settlementDisruption");
     
     if (settlementDisruptionNode != null)
     {
         if (settlementDisruptionNode.Attributes["href"] != null || settlementDisruptionNode.Attributes["id"] != null) 
         {
             if (settlementDisruptionNode.Attributes["id"] != null) 
             {
                 settlementDisruptionIDRef_ = settlementDisruptionNode.Attributes["id"].Value;
                 CommodityBullionSettlementDisruptionEnum ob = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode);
                 IDManager.SetID(settlementDisruptionIDRef_, ob);
             }
             else if (settlementDisruptionNode.Attributes["href"] != null)
             {
                 settlementDisruptionIDRef_ = settlementDisruptionNode.Attributes["href"].Value;
             }
             else
             {
                 settlementDisruption_ = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode);
             }
         }
         else
         {
             settlementDisruption_ = new CommodityBullionSettlementDisruptionEnum(settlementDisruptionNode);
         }
     }
     
 
     XmlNode roundingNode = xmlNode.SelectSingleNode("rounding");
     
     if (roundingNode != null)
     {
         if (roundingNode.Attributes["href"] != null || roundingNode.Attributes["id"] != null) 
         {
             if (roundingNode.Attributes["id"] != null) 
             {
                 roundingIDRef_ = roundingNode.Attributes["id"].Value;
                 Rounding ob = new Rounding(roundingNode);
                 IDManager.SetID(roundingIDRef_, ob);
             }
             else if (roundingNode.Attributes["href"] != null)
             {
                 roundingIDRef_ = roundingNode.Attributes["href"].Value;
             }
             else
             {
                 rounding_ = new Rounding(roundingNode);
             }
         }
         else
         {
             rounding_ = new Rounding(roundingNode);
         }
     }
     
 
 }
 public Strategy(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList strategyComponentIdentifierNodeList = xmlNode.SelectNodes("strategyComponentIdentifier");
     
     foreach (XmlNode item in strategyComponentIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strategyComponentIdentifierIDRef = item.Attributes["id"].Name;
                 List<StrategyComponentIdentification> ob = new List<StrategyComponentIdentification>();
                 ob.Add(new StrategyComponentIdentification(item));
                 IDManager.SetID(strategyComponentIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strategyComponentIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             strategyComponentIdentifier.Add(new StrategyComponentIdentification(item));
             }
         }
     }
     
 
     XmlNodeList premiumProductReferenceNodeList = xmlNode.SelectNodes("premiumProductReference");
     if (premiumProductReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in premiumProductReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 premiumProductReferenceIDRef = item.Attributes["id"].Name;
                 ProductReference ob = ProductReference();
                 IDManager.SetID(premiumProductReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 premiumProductReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 premiumProductReference = new ProductReference(item);
             }
         }
     }
     
 
     XmlNodeList productNodeList = xmlNode.SelectNodes("product");
     if (productNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in productNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 productIDRef = item.Attributes["id"].Name;
                 Product ob = Product();
                 IDManager.SetID(productIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 productIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 product = new Product(item);
             }
         }
     }
     
 
     XmlNodeList forwardNodeList = xmlNode.SelectNodes("forward");
     if (forwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forwardIDRef = item.Attributes["id"].Name;
                 ForwardSale ob = ForwardSale();
                 IDManager.SetID(forwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forward = new ForwardSale(item);
             }
         }
     }
     
 
     XmlNodeList bondOptionNodeList = xmlNode.SelectNodes("bondOption");
     if (bondOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondOptionIDRef = item.Attributes["id"].Name;
                 BondOption ob = BondOption();
                 IDManager.SetID(bondOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bondOption = new BondOption(item);
             }
         }
     }
     
 
     XmlNodeList creditDefaultSwapNodeList = xmlNode.SelectNodes("creditDefaultSwap");
     if (creditDefaultSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDefaultSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef = item.Attributes["id"].Name;
                 CreditDefaultSwap ob = CreditDefaultSwap();
                 IDManager.SetID(creditDefaultSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDefaultSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDefaultSwap = new CreditDefaultSwap(item);
             }
         }
     }
     
 
     XmlNodeList creditDefaultSwapOptionNodeList = xmlNode.SelectNodes("creditDefaultSwapOption");
     if (creditDefaultSwapOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDefaultSwapOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDefaultSwapOptionIDRef = item.Attributes["id"].Name;
                 CreditDefaultSwapOption ob = CreditDefaultSwapOption();
                 IDManager.SetID(creditDefaultSwapOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDefaultSwapOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDefaultSwapOption = new CreditDefaultSwapOption(item);
             }
         }
     }
     
 
     XmlNodeList commodityForwardNodeList = xmlNode.SelectNodes("commodityForward");
     if (commodityForwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityForwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityForwardIDRef = item.Attributes["id"].Name;
                 CommodityForward ob = CommodityForward();
                 IDManager.SetID(commodityForwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityForwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityForward = new CommodityForward(item);
             }
         }
     }
     
 
     XmlNodeList commodityOptionNodeList = xmlNode.SelectNodes("commodityOption");
     if (commodityOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityOptionIDRef = item.Attributes["id"].Name;
                 CommodityOption ob = CommodityOption();
                 IDManager.SetID(commodityOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityOption = new CommodityOption(item);
             }
         }
     }
     
 
     XmlNodeList commoditySwapNodeList = xmlNode.SelectNodes("commoditySwap");
     if (commoditySwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commoditySwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commoditySwapIDRef = item.Attributes["id"].Name;
                 CommoditySwap ob = CommoditySwap();
                 IDManager.SetID(commoditySwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commoditySwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commoditySwap = new CommoditySwap(item);
             }
         }
     }
     
 
     XmlNodeList commoditySwaptionNodeList = xmlNode.SelectNodes("commoditySwaption");
     if (commoditySwaptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commoditySwaptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commoditySwaptionIDRef = item.Attributes["id"].Name;
                 CommoditySwaption ob = CommoditySwaption();
                 IDManager.SetID(commoditySwaptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commoditySwaptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commoditySwaption = new CommoditySwaption(item);
             }
         }
     }
     
 
     XmlNodeList correlationSwapNodeList = xmlNode.SelectNodes("correlationSwap");
     if (correlationSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in correlationSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 correlationSwapIDRef = item.Attributes["id"].Name;
                 CorrelationSwap ob = CorrelationSwap();
                 IDManager.SetID(correlationSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 correlationSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 correlationSwap = new CorrelationSwap(item);
             }
         }
     }
     
 
     XmlNodeList dividendSwapOptionTransactionSupplementNodeList = xmlNode.SelectNodes("dividendSwapOptionTransactionSupplement");
     if (dividendSwapOptionTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendSwapOptionTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendSwapOptionTransactionSupplementIDRef = item.Attributes["id"].Name;
                 DividendSwapOptionTransactionSupplement ob = DividendSwapOptionTransactionSupplement();
                 IDManager.SetID(dividendSwapOptionTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendSwapOptionTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendSwapOptionTransactionSupplement = new DividendSwapOptionTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList dividendSwapTransactionSupplementNodeList = xmlNode.SelectNodes("dividendSwapTransactionSupplement");
     if (dividendSwapTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendSwapTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                 DividendSwapTransactionSupplement ob = DividendSwapTransactionSupplement();
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendSwapTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendSwapTransactionSupplement = new DividendSwapTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList instrumentTradeDetailsNodeList = xmlNode.SelectNodes("instrumentTradeDetails");
     if (instrumentTradeDetailsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in instrumentTradeDetailsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 instrumentTradeDetailsIDRef = item.Attributes["id"].Name;
                 InstrumentTradeDetails ob = InstrumentTradeDetails();
                 IDManager.SetID(instrumentTradeDetailsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 instrumentTradeDetailsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 instrumentTradeDetails = new InstrumentTradeDetails(item);
             }
         }
     }
     
 
     XmlNodeList strategyNodeList = xmlNode.SelectNodes("strategy");
     if (strategyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strategyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strategyIDRef = item.Attributes["id"].Name;
                 Strategy ob = Strategy();
                 IDManager.SetID(strategyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strategyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strategy = new Strategy(item);
             }
         }
     }
     
 
     XmlNodeList returnSwapNodeList = xmlNode.SelectNodes("returnSwap");
     if (returnSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in returnSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 returnSwapIDRef = item.Attributes["id"].Name;
                 ReturnSwap ob = ReturnSwap();
                 IDManager.SetID(returnSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 returnSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 returnSwap = new ReturnSwap(item);
             }
         }
     }
     
 
     XmlNodeList brokerEquityOptionNodeList = xmlNode.SelectNodes("brokerEquityOption");
     if (brokerEquityOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in brokerEquityOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 brokerEquityOptionIDRef = item.Attributes["id"].Name;
                 BrokerEquityOption ob = BrokerEquityOption();
                 IDManager.SetID(brokerEquityOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 brokerEquityOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 brokerEquityOption = new BrokerEquityOption(item);
             }
         }
     }
     
 
     XmlNodeList equityForwardNodeList = xmlNode.SelectNodes("equityForward");
     if (equityForwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityForwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityForwardIDRef = item.Attributes["id"].Name;
                 EquityForward ob = EquityForward();
                 IDManager.SetID(equityForwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityForwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityForward = new EquityForward(item);
             }
         }
     }
     
 
     XmlNodeList equityOptionNodeList = xmlNode.SelectNodes("equityOption");
     if (equityOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityOptionIDRef = item.Attributes["id"].Name;
                 EquityOption ob = EquityOption();
                 IDManager.SetID(equityOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityOption = new EquityOption(item);
             }
         }
     }
     
 
     XmlNodeList equityOptionTransactionSupplementNodeList = xmlNode.SelectNodes("equityOptionTransactionSupplement");
     if (equityOptionTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityOptionTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityOptionTransactionSupplementIDRef = item.Attributes["id"].Name;
                 EquityOptionTransactionSupplement ob = EquityOptionTransactionSupplement();
                 IDManager.SetID(equityOptionTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityOptionTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityOptionTransactionSupplement = new EquityOptionTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList fxSingleLegNodeList = xmlNode.SelectNodes("fxSingleLeg");
     if (fxSingleLegNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSingleLegNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSingleLegIDRef = item.Attributes["id"].Name;
                 FxSingleLeg ob = FxSingleLeg();
                 IDManager.SetID(fxSingleLegIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSingleLegIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSingleLeg = new FxSingleLeg(item);
             }
         }
     }
     
 
     XmlNodeList fxSwapNodeList = xmlNode.SelectNodes("fxSwap");
     if (fxSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSwapIDRef = item.Attributes["id"].Name;
                 FxSwap ob = FxSwap();
                 IDManager.SetID(fxSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSwap = new FxSwap(item);
             }
         }
     }
     
 
     XmlNodeList fxOptionNodeList = xmlNode.SelectNodes("fxOption");
     if (fxOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxOptionIDRef = item.Attributes["id"].Name;
                 FxOption ob = FxOption();
                 IDManager.SetID(fxOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxOption = new FxOption(item);
             }
         }
     }
     
 
     XmlNodeList fxDigitalOptionNodeList = xmlNode.SelectNodes("fxDigitalOption");
     if (fxDigitalOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxDigitalOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxDigitalOptionIDRef = item.Attributes["id"].Name;
                 FxDigitalOption ob = FxDigitalOption();
                 IDManager.SetID(fxDigitalOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxDigitalOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxDigitalOption = new FxDigitalOption(item);
             }
         }
     }
     
 
     XmlNodeList termDepositNodeList = xmlNode.SelectNodes("termDeposit");
     if (termDepositNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in termDepositNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 termDepositIDRef = item.Attributes["id"].Name;
                 TermDeposit ob = TermDeposit();
                 IDManager.SetID(termDepositIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 termDepositIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 termDeposit = new TermDeposit(item);
             }
         }
     }
     
 
     XmlNodeList genericProductNodeList = xmlNode.SelectNodes("genericProduct");
     if (genericProductNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in genericProductNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 genericProductIDRef = item.Attributes["id"].Name;
                 GenericProduct ob = GenericProduct();
                 IDManager.SetID(genericProductIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 genericProductIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 genericProduct = new GenericProduct(item);
             }
         }
     }
     
 
     XmlNodeList nonSchemaProductNodeList = xmlNode.SelectNodes("nonSchemaProduct");
     if (nonSchemaProductNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonSchemaProductNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonSchemaProductIDRef = item.Attributes["id"].Name;
                 GenericProduct ob = GenericProduct();
                 IDManager.SetID(nonSchemaProductIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonSchemaProductIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonSchemaProduct = new GenericProduct(item);
             }
         }
     }
     
 
     XmlNodeList bulletPaymentNodeList = xmlNode.SelectNodes("bulletPayment");
     if (bulletPaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bulletPaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bulletPaymentIDRef = item.Attributes["id"].Name;
                 BulletPayment ob = BulletPayment();
                 IDManager.SetID(bulletPaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bulletPaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bulletPayment = new BulletPayment(item);
             }
         }
     }
     
 
     XmlNodeList capFloorNodeList = xmlNode.SelectNodes("capFloor");
     if (capFloorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in capFloorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 capFloorIDRef = item.Attributes["id"].Name;
                 CapFloor ob = CapFloor();
                 IDManager.SetID(capFloorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 capFloorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 capFloor = new CapFloor(item);
             }
         }
     }
     
 
     XmlNodeList fraNodeList = xmlNode.SelectNodes("fra");
     if (fraNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fraNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fraIDRef = item.Attributes["id"].Name;
                 Fra ob = Fra();
                 IDManager.SetID(fraIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fraIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fra = new Fra(item);
             }
         }
     }
     
 
     XmlNodeList swapNodeList = xmlNode.SelectNodes("swap");
     if (swapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swapIDRef = item.Attributes["id"].Name;
                 Swap ob = Swap();
                 IDManager.SetID(swapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swap = new Swap(item);
             }
         }
     }
     
 
     XmlNodeList swaptionNodeList = xmlNode.SelectNodes("swaption");
     if (swaptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swaptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swaptionIDRef = item.Attributes["id"].Name;
                 Swaption ob = Swaption();
                 IDManager.SetID(swaptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swaptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swaption = new Swaption(item);
             }
         }
     }
     
 
     XmlNodeList equitySwapTransactionSupplementNodeList = xmlNode.SelectNodes("equitySwapTransactionSupplement");
     if (equitySwapTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equitySwapTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equitySwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                 EquitySwapTransactionSupplement ob = EquitySwapTransactionSupplement();
                 IDManager.SetID(equitySwapTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equitySwapTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equitySwapTransactionSupplement = new EquitySwapTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList standardProductNodeList = xmlNode.SelectNodes("standardProduct");
     if (standardProductNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in standardProductNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 standardProductIDRef = item.Attributes["id"].Name;
                 StandardProduct ob = StandardProduct();
                 IDManager.SetID(standardProductIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 standardProductIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 standardProduct = new StandardProduct(item);
             }
         }
     }
     
 
     XmlNodeList varianceOptionTransactionSupplementNodeList = xmlNode.SelectNodes("varianceOptionTransactionSupplement");
     if (varianceOptionTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceOptionTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceOptionTransactionSupplementIDRef = item.Attributes["id"].Name;
                 VarianceOptionTransactionSupplement ob = VarianceOptionTransactionSupplement();
                 IDManager.SetID(varianceOptionTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceOptionTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceOptionTransactionSupplement = new VarianceOptionTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList varianceSwapNodeList = xmlNode.SelectNodes("varianceSwap");
     if (varianceSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceSwapIDRef = item.Attributes["id"].Name;
                 VarianceSwap ob = VarianceSwap();
                 IDManager.SetID(varianceSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceSwap = new VarianceSwap(item);
             }
         }
     }
     
 
     XmlNodeList varianceSwapTransactionSupplementNodeList = xmlNode.SelectNodes("varianceSwapTransactionSupplement");
     if (varianceSwapTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceSwapTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceSwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                 VarianceSwapTransactionSupplement ob = VarianceSwapTransactionSupplement();
                 IDManager.SetID(varianceSwapTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceSwapTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceSwapTransactionSupplement = new VarianceSwapTransactionSupplement(item);
             }
         }
     }
     
 
 }
 public CommodityOption(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 optionTypeNodeList = xmlNode.SelectNodes("optionType");
     if (optionTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in optionTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 optionTypeIDRef = item.Attributes["id"].Name;
                 PutCallEnum ob = PutCallEnum();
                 IDManager.SetID(optionTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 optionTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 optionType = new PutCallEnum(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 effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");
     if (terminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in terminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 terminationDateIDRef = item.Attributes["id"].Name;
                 AdjustableOrRelativeDate ob = AdjustableOrRelativeDate();
                 IDManager.SetID(terminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 terminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 terminationDate = new AdjustableOrRelativeDate(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsScheduleNodeList = xmlNode.SelectNodes("calculationPeriodsSchedule");
     if (calculationPeriodsScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsScheduleIDRef = item.Attributes["id"].Name;
                 CommodityCalculationPeriodsSchedule ob = CommodityCalculationPeriodsSchedule();
                 IDManager.SetID(calculationPeriodsScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriodsSchedule = new CommodityCalculationPeriodsSchedule(item);
             }
         }
     }
     
 
     XmlNodeList calculationPeriodsNodeList = xmlNode.SelectNodes("calculationPeriods");
     if (calculationPeriodsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationPeriodsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationPeriodsIDRef = item.Attributes["id"].Name;
                 AdjustableDates ob = AdjustableDates();
                 IDManager.SetID(calculationPeriodsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationPeriodsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationPeriods = new AdjustableDates(item);
             }
         }
     }
     
 
     XmlNodeList pricingDatesNodeList = xmlNode.SelectNodes("pricingDates");
     if (pricingDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in pricingDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 pricingDatesIDRef = item.Attributes["id"].Name;
                 CommodityPricingDates ob = CommodityPricingDates();
                 IDManager.SetID(pricingDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 pricingDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 pricingDates = new CommodityPricingDates(item);
             }
         }
     }
     
 
     XmlNodeList averagingMethodNodeList = xmlNode.SelectNodes("averagingMethod");
     if (averagingMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in averagingMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 averagingMethodIDRef = item.Attributes["id"].Name;
                 AveragingMethodEnum ob = AveragingMethodEnum();
                 IDManager.SetID(averagingMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 averagingMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 averagingMethod = new AveragingMethodEnum(item);
             }
         }
     }
     
 
     XmlNodeList notionalQuantityScheduleNodeList = xmlNode.SelectNodes("notionalQuantitySchedule");
     if (notionalQuantityScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalQuantityScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalQuantityScheduleIDRef = item.Attributes["id"].Name;
                 CommodityNotionalQuantitySchedule ob = CommodityNotionalQuantitySchedule();
                 IDManager.SetID(notionalQuantityScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalQuantityScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalQuantitySchedule = new CommodityNotionalQuantitySchedule(item);
             }
         }
     }
     
 
     XmlNodeList notionalQuantityNodeList = xmlNode.SelectNodes("notionalQuantity");
     if (notionalQuantityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalQuantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalQuantityIDRef = item.Attributes["id"].Name;
                 CommodityNotionalQuantity ob = CommodityNotionalQuantity();
                 IDManager.SetID(notionalQuantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalQuantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalQuantity = new CommodityNotionalQuantity(item);
             }
         }
     }
     
 
     XmlNodeList settlementPeriodsNotionalQuantityNodeList = xmlNode.SelectNodes("settlementPeriodsNotionalQuantity");
     
     foreach (XmlNode item in settlementPeriodsNotionalQuantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementPeriodsNotionalQuantityIDRef = item.Attributes["id"].Name;
                 List<CommoditySettlementPeriodsNotionalQuantity> ob = new List<CommoditySettlementPeriodsNotionalQuantity>();
                 ob.Add(new CommoditySettlementPeriodsNotionalQuantity(item));
                 IDManager.SetID(settlementPeriodsNotionalQuantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementPeriodsNotionalQuantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
             settlementPeriodsNotionalQuantity.Add(new CommoditySettlementPeriodsNotionalQuantity(item));
             }
         }
     }
     
 
     XmlNodeList totalNotionalQuantityNodeList = xmlNode.SelectNodes("totalNotionalQuantity");
     if (totalNotionalQuantityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in totalNotionalQuantityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 totalNotionalQuantityIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(totalNotionalQuantityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 totalNotionalQuantityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 totalNotionalQuantity = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList quantityReferenceNodeList = xmlNode.SelectNodes("quantityReference");
     if (quantityReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in quantityReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 quantityReferenceIDRef = item.Attributes["id"].Name;
                 QuantityReference ob = QuantityReference();
                 IDManager.SetID(quantityReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 quantityReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 quantityReference = new QuantityReference(item);
             }
         }
     }
     
 
     XmlNodeList exerciseNodeList = xmlNode.SelectNodes("exercise");
     if (exerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exerciseIDRef = item.Attributes["id"].Name;
                 CommodityExercise ob = CommodityExercise();
                 IDManager.SetID(exerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exercise = new CommodityExercise(item);
             }
         }
     }
     
 
     XmlNodeList strikePricePerUnitNodeList = xmlNode.SelectNodes("strikePricePerUnit");
     if (strikePricePerUnitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strikePricePerUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strikePricePerUnitIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(strikePricePerUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikePricePerUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strikePricePerUnit = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList strikePricePerUnitScheduleNodeList = xmlNode.SelectNodes("strikePricePerUnitSchedule");
     if (strikePricePerUnitScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strikePricePerUnitScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strikePricePerUnitScheduleIDRef = item.Attributes["id"].Name;
                 CommodityStrikeSchedule ob = CommodityStrikeSchedule();
                 IDManager.SetID(strikePricePerUnitScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strikePricePerUnitScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strikePricePerUnitSchedule = new CommodityStrikeSchedule(item);
             }
         }
     }
     
 
     XmlNodeList floatingStrikePricePerUnitNodeList = xmlNode.SelectNodes("floatingStrikePricePerUnit");
     if (floatingStrikePricePerUnitNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingStrikePricePerUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingStrikePricePerUnitIDRef = item.Attributes["id"].Name;
                 FloatingStrikePrice ob = FloatingStrikePrice();
                 IDManager.SetID(floatingStrikePricePerUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingStrikePricePerUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingStrikePricePerUnit = new FloatingStrikePrice(item);
             }
         }
     }
     
 
     XmlNodeList floatingStrikePricePerUnitScheduleNodeList = xmlNode.SelectNodes("floatingStrikePricePerUnitSchedule");
     if (floatingStrikePricePerUnitScheduleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in floatingStrikePricePerUnitScheduleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 floatingStrikePricePerUnitScheduleIDRef = item.Attributes["id"].Name;
                 CommodityCalculationPeriodsSchedule ob = CommodityCalculationPeriodsSchedule();
                 IDManager.SetID(floatingStrikePricePerUnitScheduleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 floatingStrikePricePerUnitScheduleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 floatingStrikePricePerUnitSchedule = new CommodityCalculationPeriodsSchedule(item);
             }
         }
     }
     
 
     XmlNodeList commoditySwapNodeList = xmlNode.SelectNodes("commoditySwap");
     if (commoditySwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commoditySwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commoditySwapIDRef = item.Attributes["id"].Name;
                 CommoditySwap ob = CommoditySwap();
                 IDManager.SetID(commoditySwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commoditySwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commoditySwap = new CommoditySwap(item);
             }
         }
     }
     
 
     XmlNodeList commodityForwardNodeList = xmlNode.SelectNodes("commodityForward");
     if (commodityForwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityForwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityForwardIDRef = item.Attributes["id"].Name;
                 CommodityForward ob = CommodityForward();
                 IDManager.SetID(commodityForwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityForwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityForward = new CommodityForward(item);
             }
         }
     }
     
 
     XmlNodeList physicalExerciseNodeList = xmlNode.SelectNodes("physicalExercise");
     if (physicalExerciseNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in physicalExerciseNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 physicalExerciseIDRef = item.Attributes["id"].Name;
                 CommodityPhysicalExercise ob = CommodityPhysicalExercise();
                 IDManager.SetID(physicalExerciseIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 physicalExerciseIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 physicalExercise = new CommodityPhysicalExercise(item);
             }
         }
     }
     
 
     XmlNodeList weatherCalculationPeriodsNodeList = xmlNode.SelectNodes("weatherCalculationPeriods");
     if (weatherCalculationPeriodsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherCalculationPeriodsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherCalculationPeriodsIDRef = item.Attributes["id"].Name;
                 WeatherCalculationPeriods ob = WeatherCalculationPeriods();
                 IDManager.SetID(weatherCalculationPeriodsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherCalculationPeriodsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherCalculationPeriods = new WeatherCalculationPeriods(item);
             }
         }
     }
     
 
     XmlNodeList weatherCalculationPeriodsReferenceNodeList = xmlNode.SelectNodes("weatherCalculationPeriodsReference");
     if (weatherCalculationPeriodsReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherCalculationPeriodsReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherCalculationPeriodsReferenceIDRef = item.Attributes["id"].Name;
                 CalculationPeriodsReference ob = CalculationPeriodsReference();
                 IDManager.SetID(weatherCalculationPeriodsReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherCalculationPeriodsReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherCalculationPeriodsReference = new CalculationPeriodsReference(item);
             }
         }
     }
     
 
     XmlNodeList weatherNotionalAmountNodeList = xmlNode.SelectNodes("weatherNotionalAmount");
     if (weatherNotionalAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherNotionalAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherNotionalAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(weatherNotionalAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherNotionalAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherNotionalAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList weatherIndexStrikeLevelNodeList = xmlNode.SelectNodes("weatherIndexStrikeLevel");
     if (weatherIndexStrikeLevelNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherIndexStrikeLevelNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherIndexStrikeLevelIDRef = item.Attributes["id"].Name;
                 WeatherIndex ob = WeatherIndex();
                 IDManager.SetID(weatherIndexStrikeLevelIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherIndexStrikeLevelIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherIndexStrikeLevel = new WeatherIndex(item);
             }
         }
     }
     
 
     XmlNodeList calculationNodeList = xmlNode.SelectNodes("calculation");
     if (calculationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationIDRef = item.Attributes["id"].Name;
                 WeatherLegCalculation ob = WeatherLegCalculation();
                 IDManager.SetID(calculationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculation = new WeatherLegCalculation(item);
             }
         }
     }
     
 
     XmlNodeList weatherIndexDataNodeList = xmlNode.SelectNodes("weatherIndexData");
     if (weatherIndexDataNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in weatherIndexDataNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 weatherIndexDataIDRef = item.Attributes["id"].Name;
                 WeatherIndexData ob = WeatherIndexData();
                 IDManager.SetID(weatherIndexDataIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 weatherIndexDataIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 weatherIndexData = new WeatherIndexData(item);
             }
         }
     }
     
 
     XmlNodeList premiumNodeList = xmlNode.SelectNodes("premium");
     
     foreach (XmlNode item in premiumNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 premiumIDRef = item.Attributes["id"].Name;
                 List<CommodityPremium> ob = new List<CommodityPremium>();
                 ob.Add(new CommodityPremium(item));
                 IDManager.SetID(premiumIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 premiumIDRef = item.Attributes["href"].Name;
             }
             else
             {
             premium.Add(new CommodityPremium(item));
             }
         }
     }
     
 
     XmlNodeList commonPricingNodeList = xmlNode.SelectNodes("commonPricing");
     if (commonPricingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commonPricingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commonPricingIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(commonPricingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commonPricingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commonPricing = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList marketDisruptionNodeList = xmlNode.SelectNodes("marketDisruption");
     if (marketDisruptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in marketDisruptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 marketDisruptionIDRef = item.Attributes["id"].Name;
                 CommodityMarketDisruption ob = CommodityMarketDisruption();
                 IDManager.SetID(marketDisruptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 marketDisruptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 marketDisruption = new CommodityMarketDisruption(item);
             }
         }
     }
     
 
     XmlNodeList settlementDisruptionNodeList = xmlNode.SelectNodes("settlementDisruption");
     if (settlementDisruptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in settlementDisruptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 settlementDisruptionIDRef = item.Attributes["id"].Name;
                 CommodityBullionSettlementDisruptionEnum ob = CommodityBullionSettlementDisruptionEnum();
                 IDManager.SetID(settlementDisruptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 settlementDisruptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 settlementDisruption = new CommodityBullionSettlementDisruptionEnum(item);
             }
         }
     }
     
 
     XmlNodeList roundingNodeList = xmlNode.SelectNodes("rounding");
     if (roundingNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in roundingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 roundingIDRef = item.Attributes["id"].Name;
                 Rounding ob = Rounding();
                 IDManager.SetID(roundingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 roundingIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 rounding = new Rounding(item);
             }
         }
     }
     
 
 }
 public Strategy(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList strategyComponentIdentifierNodeList = xmlNode.SelectNodes("strategyComponentIdentifier");
     
     if (strategyComponentIdentifierNodeList != null)
     {
         this.strategyComponentIdentifier_ = new List<StrategyComponentIdentification>();
         foreach (XmlNode item in strategyComponentIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     strategyComponentIdentifierIDRef_ = item.Attributes["id"].Value;
                     strategyComponentIdentifier_.Add(new StrategyComponentIdentification(item));
                     IDManager.SetID(strategyComponentIdentifierIDRef_, strategyComponentIdentifier_[strategyComponentIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     strategyComponentIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 strategyComponentIdentifier_.Add(new StrategyComponentIdentification(item));
                 }
             }
             else
             {
                 strategyComponentIdentifier_.Add(new StrategyComponentIdentification(item));
             }
         }
     }
     
 
     XmlNode premiumProductReferenceNode = xmlNode.SelectSingleNode("premiumProductReference");
     
     if (premiumProductReferenceNode != null)
     {
         if (premiumProductReferenceNode.Attributes["href"] != null || premiumProductReferenceNode.Attributes["id"] != null) 
         {
             if (premiumProductReferenceNode.Attributes["id"] != null) 
             {
                 premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["id"].Value;
                 ProductReference ob = new ProductReference(premiumProductReferenceNode);
                 IDManager.SetID(premiumProductReferenceIDRef_, ob);
             }
             else if (premiumProductReferenceNode.Attributes["href"] != null)
             {
                 premiumProductReferenceIDRef_ = premiumProductReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
             }
         }
         else
         {
             premiumProductReference_ = new ProductReference(premiumProductReferenceNode);
         }
     }
     
 
     XmlNode productNode = xmlNode.SelectSingleNode("product");
     
     if (productNode != null)
     {
         if (productNode.Attributes["href"] != null || productNode.Attributes["id"] != null) 
         {
             if (productNode.Attributes["id"] != null) 
             {
                 productIDRef_ = productNode.Attributes["id"].Value;
                 Product ob = new Product(productNode);
                 IDManager.SetID(productIDRef_, ob);
             }
             else if (productNode.Attributes["href"] != null)
             {
                 productIDRef_ = productNode.Attributes["href"].Value;
             }
             else
             {
                 product_ = new Product(productNode);
             }
         }
         else
         {
             product_ = new Product(productNode);
         }
     }
     
 
     XmlNode forwardNode = xmlNode.SelectSingleNode("forward");
     
     if (forwardNode != null)
     {
         if (forwardNode.Attributes["href"] != null || forwardNode.Attributes["id"] != null) 
         {
             if (forwardNode.Attributes["id"] != null) 
             {
                 forwardIDRef_ = forwardNode.Attributes["id"].Value;
                 ForwardSale ob = new ForwardSale(forwardNode);
                 IDManager.SetID(forwardIDRef_, ob);
             }
             else if (forwardNode.Attributes["href"] != null)
             {
                 forwardIDRef_ = forwardNode.Attributes["href"].Value;
             }
             else
             {
                 forward_ = new ForwardSale(forwardNode);
             }
         }
         else
         {
             forward_ = new ForwardSale(forwardNode);
         }
     }
     
 
     XmlNode bondOptionNode = xmlNode.SelectSingleNode("bondOption");
     
     if (bondOptionNode != null)
     {
         if (bondOptionNode.Attributes["href"] != null || bondOptionNode.Attributes["id"] != null) 
         {
             if (bondOptionNode.Attributes["id"] != null) 
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["id"].Value;
                 BondOption ob = new BondOption(bondOptionNode);
                 IDManager.SetID(bondOptionIDRef_, ob);
             }
             else if (bondOptionNode.Attributes["href"] != null)
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["href"].Value;
             }
             else
             {
                 bondOption_ = new BondOption(bondOptionNode);
             }
         }
         else
         {
             bondOption_ = new BondOption(bondOptionNode);
         }
     }
     
 
     XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");
     
     if (creditDefaultSwapNode != null)
     {
         if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                 CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                 IDManager.SetID(creditDefaultSwapIDRef_, ob);
             }
             else if (creditDefaultSwapNode.Attributes["href"] != null)
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
             }
         }
         else
         {
             creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
         }
     }
     
 
     XmlNode creditDefaultSwapOptionNode = xmlNode.SelectSingleNode("creditDefaultSwapOption");
     
     if (creditDefaultSwapOptionNode != null)
     {
         if (creditDefaultSwapOptionNode.Attributes["href"] != null || creditDefaultSwapOptionNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapOptionNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["id"].Value;
                 CreditDefaultSwapOption ob = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
                 IDManager.SetID(creditDefaultSwapOptionIDRef_, ob);
             }
             else if (creditDefaultSwapOptionNode.Attributes["href"] != null)
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
             }
         }
         else
         {
             creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
         }
     }
     
 
     XmlNode commodityForwardNode = xmlNode.SelectSingleNode("commodityForward");
     
     if (commodityForwardNode != null)
     {
         if (commodityForwardNode.Attributes["href"] != null || commodityForwardNode.Attributes["id"] != null) 
         {
             if (commodityForwardNode.Attributes["id"] != null) 
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["id"].Value;
                 CommodityForward ob = new CommodityForward(commodityForwardNode);
                 IDManager.SetID(commodityForwardIDRef_, ob);
             }
             else if (commodityForwardNode.Attributes["href"] != null)
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 commodityForward_ = new CommodityForward(commodityForwardNode);
             }
         }
         else
         {
             commodityForward_ = new CommodityForward(commodityForwardNode);
         }
     }
     
 
     XmlNode commodityOptionNode = xmlNode.SelectSingleNode("commodityOption");
     
     if (commodityOptionNode != null)
     {
         if (commodityOptionNode.Attributes["href"] != null || commodityOptionNode.Attributes["id"] != null) 
         {
             if (commodityOptionNode.Attributes["id"] != null) 
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["id"].Value;
                 CommodityOption ob = new CommodityOption(commodityOptionNode);
                 IDManager.SetID(commodityOptionIDRef_, ob);
             }
             else if (commodityOptionNode.Attributes["href"] != null)
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 commodityOption_ = new CommodityOption(commodityOptionNode);
             }
         }
         else
         {
             commodityOption_ = new CommodityOption(commodityOptionNode);
         }
     }
     
 
     XmlNode commoditySwapNode = xmlNode.SelectSingleNode("commoditySwap");
     
     if (commoditySwapNode != null)
     {
         if (commoditySwapNode.Attributes["href"] != null || commoditySwapNode.Attributes["id"] != null) 
         {
             if (commoditySwapNode.Attributes["id"] != null) 
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["id"].Value;
                 CommoditySwap ob = new CommoditySwap(commoditySwapNode);
                 IDManager.SetID(commoditySwapIDRef_, ob);
             }
             else if (commoditySwapNode.Attributes["href"] != null)
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwap_ = new CommoditySwap(commoditySwapNode);
             }
         }
         else
         {
             commoditySwap_ = new CommoditySwap(commoditySwapNode);
         }
     }
     
 
     XmlNode commoditySwaptionNode = xmlNode.SelectSingleNode("commoditySwaption");
     
     if (commoditySwaptionNode != null)
     {
         if (commoditySwaptionNode.Attributes["href"] != null || commoditySwaptionNode.Attributes["id"] != null) 
         {
             if (commoditySwaptionNode.Attributes["id"] != null) 
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["id"].Value;
                 CommoditySwaption ob = new CommoditySwaption(commoditySwaptionNode);
                 IDManager.SetID(commoditySwaptionIDRef_, ob);
             }
             else if (commoditySwaptionNode.Attributes["href"] != null)
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
             }
         }
         else
         {
             commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
         }
     }
     
 
     XmlNode correlationSwapNode = xmlNode.SelectSingleNode("correlationSwap");
     
     if (correlationSwapNode != null)
     {
         if (correlationSwapNode.Attributes["href"] != null || correlationSwapNode.Attributes["id"] != null) 
         {
             if (correlationSwapNode.Attributes["id"] != null) 
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["id"].Value;
                 CorrelationSwap ob = new CorrelationSwap(correlationSwapNode);
                 IDManager.SetID(correlationSwapIDRef_, ob);
             }
             else if (correlationSwapNode.Attributes["href"] != null)
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["href"].Value;
             }
             else
             {
                 correlationSwap_ = new CorrelationSwap(correlationSwapNode);
             }
         }
         else
         {
             correlationSwap_ = new CorrelationSwap(correlationSwapNode);
         }
     }
     
 
     XmlNode dividendSwapOptionTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapOptionTransactionSupplement");
     
     if (dividendSwapOptionTransactionSupplementNode != null)
     {
         if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null || dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapOptionTransactionSupplement ob = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
                 IDManager.SetID(dividendSwapOptionTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode dividendSwapTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapTransactionSupplement");
     
     if (dividendSwapTransactionSupplementNode != null)
     {
         if (dividendSwapTransactionSupplementNode.Attributes["href"] != null || dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapTransactionSupplement ob = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode instrumentTradeDetailsNode = xmlNode.SelectSingleNode("instrumentTradeDetails");
     
     if (instrumentTradeDetailsNode != null)
     {
         if (instrumentTradeDetailsNode.Attributes["href"] != null || instrumentTradeDetailsNode.Attributes["id"] != null) 
         {
             if (instrumentTradeDetailsNode.Attributes["id"] != null) 
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["id"].Value;
                 InstrumentTradeDetails ob = new InstrumentTradeDetails(instrumentTradeDetailsNode);
                 IDManager.SetID(instrumentTradeDetailsIDRef_, ob);
             }
             else if (instrumentTradeDetailsNode.Attributes["href"] != null)
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
             }
         }
         else
         {
             instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
         }
     }
     
 
     XmlNode strategyNode = xmlNode.SelectSingleNode("strategy");
     
     if (strategyNode != null)
     {
         if (strategyNode.Attributes["href"] != null || strategyNode.Attributes["id"] != null) 
         {
             if (strategyNode.Attributes["id"] != null) 
             {
                 strategyIDRef_ = strategyNode.Attributes["id"].Value;
                 Strategy ob = new Strategy(strategyNode);
                 IDManager.SetID(strategyIDRef_, ob);
             }
             else if (strategyNode.Attributes["href"] != null)
             {
                 strategyIDRef_ = strategyNode.Attributes["href"].Value;
             }
             else
             {
                 strategy_ = new Strategy(strategyNode);
             }
         }
         else
         {
             strategy_ = new Strategy(strategyNode);
         }
     }
     
 
     XmlNode returnSwapNode = xmlNode.SelectSingleNode("returnSwap");
     
     if (returnSwapNode != null)
     {
         if (returnSwapNode.Attributes["href"] != null || returnSwapNode.Attributes["id"] != null) 
         {
             if (returnSwapNode.Attributes["id"] != null) 
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["id"].Value;
                 ReturnSwap ob = new ReturnSwap(returnSwapNode);
                 IDManager.SetID(returnSwapIDRef_, ob);
             }
             else if (returnSwapNode.Attributes["href"] != null)
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["href"].Value;
             }
             else
             {
                 returnSwap_ = new ReturnSwap(returnSwapNode);
             }
         }
         else
         {
             returnSwap_ = new ReturnSwap(returnSwapNode);
         }
     }
     
 
     XmlNode brokerEquityOptionNode = xmlNode.SelectSingleNode("brokerEquityOption");
     
     if (brokerEquityOptionNode != null)
     {
         if (brokerEquityOptionNode.Attributes["href"] != null || brokerEquityOptionNode.Attributes["id"] != null) 
         {
             if (brokerEquityOptionNode.Attributes["id"] != null) 
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["id"].Value;
                 BrokerEquityOption ob = new BrokerEquityOption(brokerEquityOptionNode);
                 IDManager.SetID(brokerEquityOptionIDRef_, ob);
             }
             else if (brokerEquityOptionNode.Attributes["href"] != null)
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
             }
         }
         else
         {
             brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
         }
     }
     
 
     XmlNode equityForwardNode = xmlNode.SelectSingleNode("equityForward");
     
     if (equityForwardNode != null)
     {
         if (equityForwardNode.Attributes["href"] != null || equityForwardNode.Attributes["id"] != null) 
         {
             if (equityForwardNode.Attributes["id"] != null) 
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["id"].Value;
                 EquityForward ob = new EquityForward(equityForwardNode);
                 IDManager.SetID(equityForwardIDRef_, ob);
             }
             else if (equityForwardNode.Attributes["href"] != null)
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 equityForward_ = new EquityForward(equityForwardNode);
             }
         }
         else
         {
             equityForward_ = new EquityForward(equityForwardNode);
         }
     }
     
 
     XmlNode equityOptionNode = xmlNode.SelectSingleNode("equityOption");
     
     if (equityOptionNode != null)
     {
         if (equityOptionNode.Attributes["href"] != null || equityOptionNode.Attributes["id"] != null) 
         {
             if (equityOptionNode.Attributes["id"] != null) 
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["id"].Value;
                 EquityOption ob = new EquityOption(equityOptionNode);
                 IDManager.SetID(equityOptionIDRef_, ob);
             }
             else if (equityOptionNode.Attributes["href"] != null)
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 equityOption_ = new EquityOption(equityOptionNode);
             }
         }
         else
         {
             equityOption_ = new EquityOption(equityOptionNode);
         }
     }
     
 
     XmlNode equityOptionTransactionSupplementNode = xmlNode.SelectSingleNode("equityOptionTransactionSupplement");
     
     if (equityOptionTransactionSupplementNode != null)
     {
         if (equityOptionTransactionSupplementNode.Attributes["href"] != null || equityOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equityOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["id"].Value;
                 EquityOptionTransactionSupplement ob = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
                 IDManager.SetID(equityOptionTransactionSupplementIDRef_, ob);
             }
             else if (equityOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
             }
         }
         else
         {
             equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode fxSingleLegNode = xmlNode.SelectSingleNode("fxSingleLeg");
     
     if (fxSingleLegNode != null)
     {
         if (fxSingleLegNode.Attributes["href"] != null || fxSingleLegNode.Attributes["id"] != null) 
         {
             if (fxSingleLegNode.Attributes["id"] != null) 
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["id"].Value;
                 FxSingleLeg ob = new FxSingleLeg(fxSingleLegNode);
                 IDManager.SetID(fxSingleLegIDRef_, ob);
             }
             else if (fxSingleLegNode.Attributes["href"] != null)
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["href"].Value;
             }
             else
             {
                 fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
             }
         }
         else
         {
             fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
         }
     }
     
 
     XmlNode fxSwapNode = xmlNode.SelectSingleNode("fxSwap");
     
     if (fxSwapNode != null)
     {
         if (fxSwapNode.Attributes["href"] != null || fxSwapNode.Attributes["id"] != null) 
         {
             if (fxSwapNode.Attributes["id"] != null) 
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["id"].Value;
                 FxSwap ob = new FxSwap(fxSwapNode);
                 IDManager.SetID(fxSwapIDRef_, ob);
             }
             else if (fxSwapNode.Attributes["href"] != null)
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["href"].Value;
             }
             else
             {
                 fxSwap_ = new FxSwap(fxSwapNode);
             }
         }
         else
         {
             fxSwap_ = new FxSwap(fxSwapNode);
         }
     }
     
 
     XmlNode fxOptionNode = xmlNode.SelectSingleNode("fxOption");
     
     if (fxOptionNode != null)
     {
         if (fxOptionNode.Attributes["href"] != null || fxOptionNode.Attributes["id"] != null) 
         {
             if (fxOptionNode.Attributes["id"] != null) 
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["id"].Value;
                 FxOption ob = new FxOption(fxOptionNode);
                 IDManager.SetID(fxOptionIDRef_, ob);
             }
             else if (fxOptionNode.Attributes["href"] != null)
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxOption_ = new FxOption(fxOptionNode);
             }
         }
         else
         {
             fxOption_ = new FxOption(fxOptionNode);
         }
     }
     
 
     XmlNode fxDigitalOptionNode = xmlNode.SelectSingleNode("fxDigitalOption");
     
     if (fxDigitalOptionNode != null)
     {
         if (fxDigitalOptionNode.Attributes["href"] != null || fxDigitalOptionNode.Attributes["id"] != null) 
         {
             if (fxDigitalOptionNode.Attributes["id"] != null) 
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["id"].Value;
                 FxDigitalOption ob = new FxDigitalOption(fxDigitalOptionNode);
                 IDManager.SetID(fxDigitalOptionIDRef_, ob);
             }
             else if (fxDigitalOptionNode.Attributes["href"] != null)
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
             }
         }
         else
         {
             fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
         }
     }
     
 
     XmlNode termDepositNode = xmlNode.SelectSingleNode("termDeposit");
     
     if (termDepositNode != null)
     {
         if (termDepositNode.Attributes["href"] != null || termDepositNode.Attributes["id"] != null) 
         {
             if (termDepositNode.Attributes["id"] != null) 
             {
                 termDepositIDRef_ = termDepositNode.Attributes["id"].Value;
                 TermDeposit ob = new TermDeposit(termDepositNode);
                 IDManager.SetID(termDepositIDRef_, ob);
             }
             else if (termDepositNode.Attributes["href"] != null)
             {
                 termDepositIDRef_ = termDepositNode.Attributes["href"].Value;
             }
             else
             {
                 termDeposit_ = new TermDeposit(termDepositNode);
             }
         }
         else
         {
             termDeposit_ = new TermDeposit(termDepositNode);
         }
     }
     
 
     XmlNode genericProductNode = xmlNode.SelectSingleNode("genericProduct");
     
     if (genericProductNode != null)
     {
         if (genericProductNode.Attributes["href"] != null || genericProductNode.Attributes["id"] != null) 
         {
             if (genericProductNode.Attributes["id"] != null) 
             {
                 genericProductIDRef_ = genericProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(genericProductNode);
                 IDManager.SetID(genericProductIDRef_, ob);
             }
             else if (genericProductNode.Attributes["href"] != null)
             {
                 genericProductIDRef_ = genericProductNode.Attributes["href"].Value;
             }
             else
             {
                 genericProduct_ = new GenericProduct(genericProductNode);
             }
         }
         else
         {
             genericProduct_ = new GenericProduct(genericProductNode);
         }
     }
     
 
     XmlNode nonSchemaProductNode = xmlNode.SelectSingleNode("nonSchemaProduct");
     
     if (nonSchemaProductNode != null)
     {
         if (nonSchemaProductNode.Attributes["href"] != null || nonSchemaProductNode.Attributes["id"] != null) 
         {
             if (nonSchemaProductNode.Attributes["id"] != null) 
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(nonSchemaProductNode);
                 IDManager.SetID(nonSchemaProductIDRef_, ob);
             }
             else if (nonSchemaProductNode.Attributes["href"] != null)
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["href"].Value;
             }
             else
             {
                 nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
             }
         }
         else
         {
             nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
         }
     }
     
 
     XmlNode bulletPaymentNode = xmlNode.SelectSingleNode("bulletPayment");
     
     if (bulletPaymentNode != null)
     {
         if (bulletPaymentNode.Attributes["href"] != null || bulletPaymentNode.Attributes["id"] != null) 
         {
             if (bulletPaymentNode.Attributes["id"] != null) 
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["id"].Value;
                 BulletPayment ob = new BulletPayment(bulletPaymentNode);
                 IDManager.SetID(bulletPaymentIDRef_, ob);
             }
             else if (bulletPaymentNode.Attributes["href"] != null)
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["href"].Value;
             }
             else
             {
                 bulletPayment_ = new BulletPayment(bulletPaymentNode);
             }
         }
         else
         {
             bulletPayment_ = new BulletPayment(bulletPaymentNode);
         }
     }
     
 
     XmlNode capFloorNode = xmlNode.SelectSingleNode("capFloor");
     
     if (capFloorNode != null)
     {
         if (capFloorNode.Attributes["href"] != null || capFloorNode.Attributes["id"] != null) 
         {
             if (capFloorNode.Attributes["id"] != null) 
             {
                 capFloorIDRef_ = capFloorNode.Attributes["id"].Value;
                 CapFloor ob = new CapFloor(capFloorNode);
                 IDManager.SetID(capFloorIDRef_, ob);
             }
             else if (capFloorNode.Attributes["href"] != null)
             {
                 capFloorIDRef_ = capFloorNode.Attributes["href"].Value;
             }
             else
             {
                 capFloor_ = new CapFloor(capFloorNode);
             }
         }
         else
         {
             capFloor_ = new CapFloor(capFloorNode);
         }
     }
     
 
     XmlNode fraNode = xmlNode.SelectSingleNode("fra");
     
     if (fraNode != null)
     {
         if (fraNode.Attributes["href"] != null || fraNode.Attributes["id"] != null) 
         {
             if (fraNode.Attributes["id"] != null) 
             {
                 fraIDRef_ = fraNode.Attributes["id"].Value;
                 Fra ob = new Fra(fraNode);
                 IDManager.SetID(fraIDRef_, ob);
             }
             else if (fraNode.Attributes["href"] != null)
             {
                 fraIDRef_ = fraNode.Attributes["href"].Value;
             }
             else
             {
                 fra_ = new Fra(fraNode);
             }
         }
         else
         {
             fra_ = new Fra(fraNode);
         }
     }
     
 
     XmlNode swapNode = xmlNode.SelectSingleNode("swap");
     
     if (swapNode != null)
     {
         if (swapNode.Attributes["href"] != null || swapNode.Attributes["id"] != null) 
         {
             if (swapNode.Attributes["id"] != null) 
             {
                 swapIDRef_ = swapNode.Attributes["id"].Value;
                 Swap ob = new Swap(swapNode);
                 IDManager.SetID(swapIDRef_, ob);
             }
             else if (swapNode.Attributes["href"] != null)
             {
                 swapIDRef_ = swapNode.Attributes["href"].Value;
             }
             else
             {
                 swap_ = new Swap(swapNode);
             }
         }
         else
         {
             swap_ = new Swap(swapNode);
         }
     }
     
 
     XmlNode swaptionNode = xmlNode.SelectSingleNode("swaption");
     
     if (swaptionNode != null)
     {
         if (swaptionNode.Attributes["href"] != null || swaptionNode.Attributes["id"] != null) 
         {
             if (swaptionNode.Attributes["id"] != null) 
             {
                 swaptionIDRef_ = swaptionNode.Attributes["id"].Value;
                 Swaption ob = new Swaption(swaptionNode);
                 IDManager.SetID(swaptionIDRef_, ob);
             }
             else if (swaptionNode.Attributes["href"] != null)
             {
                 swaptionIDRef_ = swaptionNode.Attributes["href"].Value;
             }
             else
             {
                 swaption_ = new Swaption(swaptionNode);
             }
         }
         else
         {
             swaption_ = new Swaption(swaptionNode);
         }
     }
     
 
     XmlNode equitySwapTransactionSupplementNode = xmlNode.SelectSingleNode("equitySwapTransactionSupplement");
     
     if (equitySwapTransactionSupplementNode != null)
     {
         if (equitySwapTransactionSupplementNode.Attributes["href"] != null || equitySwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equitySwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["id"].Value;
                 EquitySwapTransactionSupplement ob = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
                 IDManager.SetID(equitySwapTransactionSupplementIDRef_, ob);
             }
             else if (equitySwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
             }
         }
         else
         {
             equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode standardProductNode = xmlNode.SelectSingleNode("standardProduct");
     
     if (standardProductNode != null)
     {
         if (standardProductNode.Attributes["href"] != null || standardProductNode.Attributes["id"] != null) 
         {
             if (standardProductNode.Attributes["id"] != null) 
             {
                 standardProductIDRef_ = standardProductNode.Attributes["id"].Value;
                 StandardProduct ob = new StandardProduct(standardProductNode);
                 IDManager.SetID(standardProductIDRef_, ob);
             }
             else if (standardProductNode.Attributes["href"] != null)
             {
                 standardProductIDRef_ = standardProductNode.Attributes["href"].Value;
             }
             else
             {
                 standardProduct_ = new StandardProduct(standardProductNode);
             }
         }
         else
         {
             standardProduct_ = new StandardProduct(standardProductNode);
         }
     }
     
 
     XmlNode varianceOptionTransactionSupplementNode = xmlNode.SelectSingleNode("varianceOptionTransactionSupplement");
     
     if (varianceOptionTransactionSupplementNode != null)
     {
         if (varianceOptionTransactionSupplementNode.Attributes["href"] != null || varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["id"].Value;
                 VarianceOptionTransactionSupplement ob = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
                 IDManager.SetID(varianceOptionTransactionSupplementIDRef_, ob);
             }
             else if (varianceOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
             }
         }
         else
         {
             varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode varianceSwapNode = xmlNode.SelectSingleNode("varianceSwap");
     
     if (varianceSwapNode != null)
     {
         if (varianceSwapNode.Attributes["href"] != null || varianceSwapNode.Attributes["id"] != null) 
         {
             if (varianceSwapNode.Attributes["id"] != null) 
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["id"].Value;
                 VarianceSwap ob = new VarianceSwap(varianceSwapNode);
                 IDManager.SetID(varianceSwapIDRef_, ob);
             }
             else if (varianceSwapNode.Attributes["href"] != null)
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwap_ = new VarianceSwap(varianceSwapNode);
             }
         }
         else
         {
             varianceSwap_ = new VarianceSwap(varianceSwapNode);
         }
     }
     
 
     XmlNode varianceSwapTransactionSupplementNode = xmlNode.SelectSingleNode("varianceSwapTransactionSupplement");
     
     if (varianceSwapTransactionSupplementNode != null)
     {
         if (varianceSwapTransactionSupplementNode.Attributes["href"] != null || varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["id"].Value;
                 VarianceSwapTransactionSupplement ob = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
                 IDManager.SetID(varianceSwapTransactionSupplementIDRef_, ob);
             }
             else if (varianceSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
             }
         }
         else
         {
             varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
         }
     }
     
 
 }
 public Trade(XmlNode xmlNode)
 {
     XmlNode tradeHeaderNode = xmlNode.SelectSingleNode("tradeHeader");
     
     if (tradeHeaderNode != null)
     {
         if (tradeHeaderNode.Attributes["href"] != null || tradeHeaderNode.Attributes["id"] != null) 
         {
             if (tradeHeaderNode.Attributes["id"] != null) 
             {
                 tradeHeaderIDRef_ = tradeHeaderNode.Attributes["id"].Value;
                 TradeHeader ob = new TradeHeader(tradeHeaderNode);
                 IDManager.SetID(tradeHeaderIDRef_, ob);
             }
             else if (tradeHeaderNode.Attributes["href"] != null)
             {
                 tradeHeaderIDRef_ = tradeHeaderNode.Attributes["href"].Value;
             }
             else
             {
                 tradeHeader_ = new TradeHeader(tradeHeaderNode);
             }
         }
         else
         {
             tradeHeader_ = new TradeHeader(tradeHeaderNode);
         }
     }
     
 
     XmlNode productNode = xmlNode.SelectSingleNode("product");
     
     if (productNode != null)
     {
         if (productNode.Attributes["href"] != null || productNode.Attributes["id"] != null) 
         {
             if (productNode.Attributes["id"] != null) 
             {
                 productIDRef_ = productNode.Attributes["id"].Value;
                 Product ob = new Product(productNode);
                 IDManager.SetID(productIDRef_, ob);
             }
             else if (productNode.Attributes["href"] != null)
             {
                 productIDRef_ = productNode.Attributes["href"].Value;
             }
             else
             {
                 product_ = new Product(productNode);
             }
         }
         else
         {
             product_ = new Product(productNode);
         }
     }
     
 
     XmlNode forwardNode = xmlNode.SelectSingleNode("forward");
     
     if (forwardNode != null)
     {
         if (forwardNode.Attributes["href"] != null || forwardNode.Attributes["id"] != null) 
         {
             if (forwardNode.Attributes["id"] != null) 
             {
                 forwardIDRef_ = forwardNode.Attributes["id"].Value;
                 ForwardSale ob = new ForwardSale(forwardNode);
                 IDManager.SetID(forwardIDRef_, ob);
             }
             else if (forwardNode.Attributes["href"] != null)
             {
                 forwardIDRef_ = forwardNode.Attributes["href"].Value;
             }
             else
             {
                 forward_ = new ForwardSale(forwardNode);
             }
         }
         else
         {
             forward_ = new ForwardSale(forwardNode);
         }
     }
     
 
     XmlNode bondOptionNode = xmlNode.SelectSingleNode("bondOption");
     
     if (bondOptionNode != null)
     {
         if (bondOptionNode.Attributes["href"] != null || bondOptionNode.Attributes["id"] != null) 
         {
             if (bondOptionNode.Attributes["id"] != null) 
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["id"].Value;
                 BondOption ob = new BondOption(bondOptionNode);
                 IDManager.SetID(bondOptionIDRef_, ob);
             }
             else if (bondOptionNode.Attributes["href"] != null)
             {
                 bondOptionIDRef_ = bondOptionNode.Attributes["href"].Value;
             }
             else
             {
                 bondOption_ = new BondOption(bondOptionNode);
             }
         }
         else
         {
             bondOption_ = new BondOption(bondOptionNode);
         }
     }
     
 
     XmlNode creditDefaultSwapNode = xmlNode.SelectSingleNode("creditDefaultSwap");
     
     if (creditDefaultSwapNode != null)
     {
         if (creditDefaultSwapNode.Attributes["href"] != null || creditDefaultSwapNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["id"].Value;
                 CreditDefaultSwap ob = new CreditDefaultSwap(creditDefaultSwapNode);
                 IDManager.SetID(creditDefaultSwapIDRef_, ob);
             }
             else if (creditDefaultSwapNode.Attributes["href"] != null)
             {
                 creditDefaultSwapIDRef_ = creditDefaultSwapNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
             }
         }
         else
         {
             creditDefaultSwap_ = new CreditDefaultSwap(creditDefaultSwapNode);
         }
     }
     
 
     XmlNode creditDefaultSwapOptionNode = xmlNode.SelectSingleNode("creditDefaultSwapOption");
     
     if (creditDefaultSwapOptionNode != null)
     {
         if (creditDefaultSwapOptionNode.Attributes["href"] != null || creditDefaultSwapOptionNode.Attributes["id"] != null) 
         {
             if (creditDefaultSwapOptionNode.Attributes["id"] != null) 
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["id"].Value;
                 CreditDefaultSwapOption ob = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
                 IDManager.SetID(creditDefaultSwapOptionIDRef_, ob);
             }
             else if (creditDefaultSwapOptionNode.Attributes["href"] != null)
             {
                 creditDefaultSwapOptionIDRef_ = creditDefaultSwapOptionNode.Attributes["href"].Value;
             }
             else
             {
                 creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
             }
         }
         else
         {
             creditDefaultSwapOption_ = new CreditDefaultSwapOption(creditDefaultSwapOptionNode);
         }
     }
     
 
     XmlNode commodityForwardNode = xmlNode.SelectSingleNode("commodityForward");
     
     if (commodityForwardNode != null)
     {
         if (commodityForwardNode.Attributes["href"] != null || commodityForwardNode.Attributes["id"] != null) 
         {
             if (commodityForwardNode.Attributes["id"] != null) 
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["id"].Value;
                 CommodityForward ob = new CommodityForward(commodityForwardNode);
                 IDManager.SetID(commodityForwardIDRef_, ob);
             }
             else if (commodityForwardNode.Attributes["href"] != null)
             {
                 commodityForwardIDRef_ = commodityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 commodityForward_ = new CommodityForward(commodityForwardNode);
             }
         }
         else
         {
             commodityForward_ = new CommodityForward(commodityForwardNode);
         }
     }
     
 
     XmlNode commodityOptionNode = xmlNode.SelectSingleNode("commodityOption");
     
     if (commodityOptionNode != null)
     {
         if (commodityOptionNode.Attributes["href"] != null || commodityOptionNode.Attributes["id"] != null) 
         {
             if (commodityOptionNode.Attributes["id"] != null) 
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["id"].Value;
                 CommodityOption ob = new CommodityOption(commodityOptionNode);
                 IDManager.SetID(commodityOptionIDRef_, ob);
             }
             else if (commodityOptionNode.Attributes["href"] != null)
             {
                 commodityOptionIDRef_ = commodityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 commodityOption_ = new CommodityOption(commodityOptionNode);
             }
         }
         else
         {
             commodityOption_ = new CommodityOption(commodityOptionNode);
         }
     }
     
 
     XmlNode commoditySwapNode = xmlNode.SelectSingleNode("commoditySwap");
     
     if (commoditySwapNode != null)
     {
         if (commoditySwapNode.Attributes["href"] != null || commoditySwapNode.Attributes["id"] != null) 
         {
             if (commoditySwapNode.Attributes["id"] != null) 
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["id"].Value;
                 CommoditySwap ob = new CommoditySwap(commoditySwapNode);
                 IDManager.SetID(commoditySwapIDRef_, ob);
             }
             else if (commoditySwapNode.Attributes["href"] != null)
             {
                 commoditySwapIDRef_ = commoditySwapNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwap_ = new CommoditySwap(commoditySwapNode);
             }
         }
         else
         {
             commoditySwap_ = new CommoditySwap(commoditySwapNode);
         }
     }
     
 
     XmlNode commoditySwaptionNode = xmlNode.SelectSingleNode("commoditySwaption");
     
     if (commoditySwaptionNode != null)
     {
         if (commoditySwaptionNode.Attributes["href"] != null || commoditySwaptionNode.Attributes["id"] != null) 
         {
             if (commoditySwaptionNode.Attributes["id"] != null) 
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["id"].Value;
                 CommoditySwaption ob = new CommoditySwaption(commoditySwaptionNode);
                 IDManager.SetID(commoditySwaptionIDRef_, ob);
             }
             else if (commoditySwaptionNode.Attributes["href"] != null)
             {
                 commoditySwaptionIDRef_ = commoditySwaptionNode.Attributes["href"].Value;
             }
             else
             {
                 commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
             }
         }
         else
         {
             commoditySwaption_ = new CommoditySwaption(commoditySwaptionNode);
         }
     }
     
 
     XmlNode correlationSwapNode = xmlNode.SelectSingleNode("correlationSwap");
     
     if (correlationSwapNode != null)
     {
         if (correlationSwapNode.Attributes["href"] != null || correlationSwapNode.Attributes["id"] != null) 
         {
             if (correlationSwapNode.Attributes["id"] != null) 
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["id"].Value;
                 CorrelationSwap ob = new CorrelationSwap(correlationSwapNode);
                 IDManager.SetID(correlationSwapIDRef_, ob);
             }
             else if (correlationSwapNode.Attributes["href"] != null)
             {
                 correlationSwapIDRef_ = correlationSwapNode.Attributes["href"].Value;
             }
             else
             {
                 correlationSwap_ = new CorrelationSwap(correlationSwapNode);
             }
         }
         else
         {
             correlationSwap_ = new CorrelationSwap(correlationSwapNode);
         }
     }
     
 
     XmlNode dividendSwapOptionTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapOptionTransactionSupplement");
     
     if (dividendSwapOptionTransactionSupplementNode != null)
     {
         if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null || dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapOptionTransactionSupplement ob = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
                 IDManager.SetID(dividendSwapOptionTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapOptionTransactionSupplementIDRef_ = dividendSwapOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapOptionTransactionSupplement_ = new DividendSwapOptionTransactionSupplement(dividendSwapOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode dividendSwapTransactionSupplementNode = xmlNode.SelectSingleNode("dividendSwapTransactionSupplement");
     
     if (dividendSwapTransactionSupplementNode != null)
     {
         if (dividendSwapTransactionSupplementNode.Attributes["href"] != null || dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (dividendSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["id"].Value;
                 DividendSwapTransactionSupplement ob = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef_, ob);
             }
             else if (dividendSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 dividendSwapTransactionSupplementIDRef_ = dividendSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
             }
         }
         else
         {
             dividendSwapTransactionSupplement_ = new DividendSwapTransactionSupplement(dividendSwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode instrumentTradeDetailsNode = xmlNode.SelectSingleNode("instrumentTradeDetails");
     
     if (instrumentTradeDetailsNode != null)
     {
         if (instrumentTradeDetailsNode.Attributes["href"] != null || instrumentTradeDetailsNode.Attributes["id"] != null) 
         {
             if (instrumentTradeDetailsNode.Attributes["id"] != null) 
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["id"].Value;
                 InstrumentTradeDetails ob = new InstrumentTradeDetails(instrumentTradeDetailsNode);
                 IDManager.SetID(instrumentTradeDetailsIDRef_, ob);
             }
             else if (instrumentTradeDetailsNode.Attributes["href"] != null)
             {
                 instrumentTradeDetailsIDRef_ = instrumentTradeDetailsNode.Attributes["href"].Value;
             }
             else
             {
                 instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
             }
         }
         else
         {
             instrumentTradeDetails_ = new InstrumentTradeDetails(instrumentTradeDetailsNode);
         }
     }
     
 
     XmlNode strategyNode = xmlNode.SelectSingleNode("strategy");
     
     if (strategyNode != null)
     {
         if (strategyNode.Attributes["href"] != null || strategyNode.Attributes["id"] != null) 
         {
             if (strategyNode.Attributes["id"] != null) 
             {
                 strategyIDRef_ = strategyNode.Attributes["id"].Value;
                 Strategy ob = new Strategy(strategyNode);
                 IDManager.SetID(strategyIDRef_, ob);
             }
             else if (strategyNode.Attributes["href"] != null)
             {
                 strategyIDRef_ = strategyNode.Attributes["href"].Value;
             }
             else
             {
                 strategy_ = new Strategy(strategyNode);
             }
         }
         else
         {
             strategy_ = new Strategy(strategyNode);
         }
     }
     
 
     XmlNode returnSwapNode = xmlNode.SelectSingleNode("returnSwap");
     
     if (returnSwapNode != null)
     {
         if (returnSwapNode.Attributes["href"] != null || returnSwapNode.Attributes["id"] != null) 
         {
             if (returnSwapNode.Attributes["id"] != null) 
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["id"].Value;
                 ReturnSwap ob = new ReturnSwap(returnSwapNode);
                 IDManager.SetID(returnSwapIDRef_, ob);
             }
             else if (returnSwapNode.Attributes["href"] != null)
             {
                 returnSwapIDRef_ = returnSwapNode.Attributes["href"].Value;
             }
             else
             {
                 returnSwap_ = new ReturnSwap(returnSwapNode);
             }
         }
         else
         {
             returnSwap_ = new ReturnSwap(returnSwapNode);
         }
     }
     
 
     XmlNode brokerEquityOptionNode = xmlNode.SelectSingleNode("brokerEquityOption");
     
     if (brokerEquityOptionNode != null)
     {
         if (brokerEquityOptionNode.Attributes["href"] != null || brokerEquityOptionNode.Attributes["id"] != null) 
         {
             if (brokerEquityOptionNode.Attributes["id"] != null) 
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["id"].Value;
                 BrokerEquityOption ob = new BrokerEquityOption(brokerEquityOptionNode);
                 IDManager.SetID(brokerEquityOptionIDRef_, ob);
             }
             else if (brokerEquityOptionNode.Attributes["href"] != null)
             {
                 brokerEquityOptionIDRef_ = brokerEquityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
             }
         }
         else
         {
             brokerEquityOption_ = new BrokerEquityOption(brokerEquityOptionNode);
         }
     }
     
 
     XmlNode equityForwardNode = xmlNode.SelectSingleNode("equityForward");
     
     if (equityForwardNode != null)
     {
         if (equityForwardNode.Attributes["href"] != null || equityForwardNode.Attributes["id"] != null) 
         {
             if (equityForwardNode.Attributes["id"] != null) 
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["id"].Value;
                 EquityForward ob = new EquityForward(equityForwardNode);
                 IDManager.SetID(equityForwardIDRef_, ob);
             }
             else if (equityForwardNode.Attributes["href"] != null)
             {
                 equityForwardIDRef_ = equityForwardNode.Attributes["href"].Value;
             }
             else
             {
                 equityForward_ = new EquityForward(equityForwardNode);
             }
         }
         else
         {
             equityForward_ = new EquityForward(equityForwardNode);
         }
     }
     
 
     XmlNode equityOptionNode = xmlNode.SelectSingleNode("equityOption");
     
     if (equityOptionNode != null)
     {
         if (equityOptionNode.Attributes["href"] != null || equityOptionNode.Attributes["id"] != null) 
         {
             if (equityOptionNode.Attributes["id"] != null) 
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["id"].Value;
                 EquityOption ob = new EquityOption(equityOptionNode);
                 IDManager.SetID(equityOptionIDRef_, ob);
             }
             else if (equityOptionNode.Attributes["href"] != null)
             {
                 equityOptionIDRef_ = equityOptionNode.Attributes["href"].Value;
             }
             else
             {
                 equityOption_ = new EquityOption(equityOptionNode);
             }
         }
         else
         {
             equityOption_ = new EquityOption(equityOptionNode);
         }
     }
     
 
     XmlNode equityOptionTransactionSupplementNode = xmlNode.SelectSingleNode("equityOptionTransactionSupplement");
     
     if (equityOptionTransactionSupplementNode != null)
     {
         if (equityOptionTransactionSupplementNode.Attributes["href"] != null || equityOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equityOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["id"].Value;
                 EquityOptionTransactionSupplement ob = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
                 IDManager.SetID(equityOptionTransactionSupplementIDRef_, ob);
             }
             else if (equityOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 equityOptionTransactionSupplementIDRef_ = equityOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
             }
         }
         else
         {
             equityOptionTransactionSupplement_ = new EquityOptionTransactionSupplement(equityOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode fxSingleLegNode = xmlNode.SelectSingleNode("fxSingleLeg");
     
     if (fxSingleLegNode != null)
     {
         if (fxSingleLegNode.Attributes["href"] != null || fxSingleLegNode.Attributes["id"] != null) 
         {
             if (fxSingleLegNode.Attributes["id"] != null) 
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["id"].Value;
                 FxSingleLeg ob = new FxSingleLeg(fxSingleLegNode);
                 IDManager.SetID(fxSingleLegIDRef_, ob);
             }
             else if (fxSingleLegNode.Attributes["href"] != null)
             {
                 fxSingleLegIDRef_ = fxSingleLegNode.Attributes["href"].Value;
             }
             else
             {
                 fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
             }
         }
         else
         {
             fxSingleLeg_ = new FxSingleLeg(fxSingleLegNode);
         }
     }
     
 
     XmlNode fxSwapNode = xmlNode.SelectSingleNode("fxSwap");
     
     if (fxSwapNode != null)
     {
         if (fxSwapNode.Attributes["href"] != null || fxSwapNode.Attributes["id"] != null) 
         {
             if (fxSwapNode.Attributes["id"] != null) 
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["id"].Value;
                 FxSwap ob = new FxSwap(fxSwapNode);
                 IDManager.SetID(fxSwapIDRef_, ob);
             }
             else if (fxSwapNode.Attributes["href"] != null)
             {
                 fxSwapIDRef_ = fxSwapNode.Attributes["href"].Value;
             }
             else
             {
                 fxSwap_ = new FxSwap(fxSwapNode);
             }
         }
         else
         {
             fxSwap_ = new FxSwap(fxSwapNode);
         }
     }
     
 
     XmlNode fxOptionNode = xmlNode.SelectSingleNode("fxOption");
     
     if (fxOptionNode != null)
     {
         if (fxOptionNode.Attributes["href"] != null || fxOptionNode.Attributes["id"] != null) 
         {
             if (fxOptionNode.Attributes["id"] != null) 
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["id"].Value;
                 FxOption ob = new FxOption(fxOptionNode);
                 IDManager.SetID(fxOptionIDRef_, ob);
             }
             else if (fxOptionNode.Attributes["href"] != null)
             {
                 fxOptionIDRef_ = fxOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxOption_ = new FxOption(fxOptionNode);
             }
         }
         else
         {
             fxOption_ = new FxOption(fxOptionNode);
         }
     }
     
 
     XmlNode fxDigitalOptionNode = xmlNode.SelectSingleNode("fxDigitalOption");
     
     if (fxDigitalOptionNode != null)
     {
         if (fxDigitalOptionNode.Attributes["href"] != null || fxDigitalOptionNode.Attributes["id"] != null) 
         {
             if (fxDigitalOptionNode.Attributes["id"] != null) 
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["id"].Value;
                 FxDigitalOption ob = new FxDigitalOption(fxDigitalOptionNode);
                 IDManager.SetID(fxDigitalOptionIDRef_, ob);
             }
             else if (fxDigitalOptionNode.Attributes["href"] != null)
             {
                 fxDigitalOptionIDRef_ = fxDigitalOptionNode.Attributes["href"].Value;
             }
             else
             {
                 fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
             }
         }
         else
         {
             fxDigitalOption_ = new FxDigitalOption(fxDigitalOptionNode);
         }
     }
     
 
     XmlNode termDepositNode = xmlNode.SelectSingleNode("termDeposit");
     
     if (termDepositNode != null)
     {
         if (termDepositNode.Attributes["href"] != null || termDepositNode.Attributes["id"] != null) 
         {
             if (termDepositNode.Attributes["id"] != null) 
             {
                 termDepositIDRef_ = termDepositNode.Attributes["id"].Value;
                 TermDeposit ob = new TermDeposit(termDepositNode);
                 IDManager.SetID(termDepositIDRef_, ob);
             }
             else if (termDepositNode.Attributes["href"] != null)
             {
                 termDepositIDRef_ = termDepositNode.Attributes["href"].Value;
             }
             else
             {
                 termDeposit_ = new TermDeposit(termDepositNode);
             }
         }
         else
         {
             termDeposit_ = new TermDeposit(termDepositNode);
         }
     }
     
 
     XmlNode genericProductNode = xmlNode.SelectSingleNode("genericProduct");
     
     if (genericProductNode != null)
     {
         if (genericProductNode.Attributes["href"] != null || genericProductNode.Attributes["id"] != null) 
         {
             if (genericProductNode.Attributes["id"] != null) 
             {
                 genericProductIDRef_ = genericProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(genericProductNode);
                 IDManager.SetID(genericProductIDRef_, ob);
             }
             else if (genericProductNode.Attributes["href"] != null)
             {
                 genericProductIDRef_ = genericProductNode.Attributes["href"].Value;
             }
             else
             {
                 genericProduct_ = new GenericProduct(genericProductNode);
             }
         }
         else
         {
             genericProduct_ = new GenericProduct(genericProductNode);
         }
     }
     
 
     XmlNode nonSchemaProductNode = xmlNode.SelectSingleNode("nonSchemaProduct");
     
     if (nonSchemaProductNode != null)
     {
         if (nonSchemaProductNode.Attributes["href"] != null || nonSchemaProductNode.Attributes["id"] != null) 
         {
             if (nonSchemaProductNode.Attributes["id"] != null) 
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["id"].Value;
                 GenericProduct ob = new GenericProduct(nonSchemaProductNode);
                 IDManager.SetID(nonSchemaProductIDRef_, ob);
             }
             else if (nonSchemaProductNode.Attributes["href"] != null)
             {
                 nonSchemaProductIDRef_ = nonSchemaProductNode.Attributes["href"].Value;
             }
             else
             {
                 nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
             }
         }
         else
         {
             nonSchemaProduct_ = new GenericProduct(nonSchemaProductNode);
         }
     }
     
 
     XmlNode bulletPaymentNode = xmlNode.SelectSingleNode("bulletPayment");
     
     if (bulletPaymentNode != null)
     {
         if (bulletPaymentNode.Attributes["href"] != null || bulletPaymentNode.Attributes["id"] != null) 
         {
             if (bulletPaymentNode.Attributes["id"] != null) 
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["id"].Value;
                 BulletPayment ob = new BulletPayment(bulletPaymentNode);
                 IDManager.SetID(bulletPaymentIDRef_, ob);
             }
             else if (bulletPaymentNode.Attributes["href"] != null)
             {
                 bulletPaymentIDRef_ = bulletPaymentNode.Attributes["href"].Value;
             }
             else
             {
                 bulletPayment_ = new BulletPayment(bulletPaymentNode);
             }
         }
         else
         {
             bulletPayment_ = new BulletPayment(bulletPaymentNode);
         }
     }
     
 
     XmlNode capFloorNode = xmlNode.SelectSingleNode("capFloor");
     
     if (capFloorNode != null)
     {
         if (capFloorNode.Attributes["href"] != null || capFloorNode.Attributes["id"] != null) 
         {
             if (capFloorNode.Attributes["id"] != null) 
             {
                 capFloorIDRef_ = capFloorNode.Attributes["id"].Value;
                 CapFloor ob = new CapFloor(capFloorNode);
                 IDManager.SetID(capFloorIDRef_, ob);
             }
             else if (capFloorNode.Attributes["href"] != null)
             {
                 capFloorIDRef_ = capFloorNode.Attributes["href"].Value;
             }
             else
             {
                 capFloor_ = new CapFloor(capFloorNode);
             }
         }
         else
         {
             capFloor_ = new CapFloor(capFloorNode);
         }
     }
     
 
     XmlNode fraNode = xmlNode.SelectSingleNode("fra");
     
     if (fraNode != null)
     {
         if (fraNode.Attributes["href"] != null || fraNode.Attributes["id"] != null) 
         {
             if (fraNode.Attributes["id"] != null) 
             {
                 fraIDRef_ = fraNode.Attributes["id"].Value;
                 Fra ob = new Fra(fraNode);
                 IDManager.SetID(fraIDRef_, ob);
             }
             else if (fraNode.Attributes["href"] != null)
             {
                 fraIDRef_ = fraNode.Attributes["href"].Value;
             }
             else
             {
                 fra_ = new Fra(fraNode);
             }
         }
         else
         {
             fra_ = new Fra(fraNode);
         }
     }
     
 
     XmlNode swapNode = xmlNode.SelectSingleNode("swap");
     
     if (swapNode != null)
     {
         if (swapNode.Attributes["href"] != null || swapNode.Attributes["id"] != null) 
         {
             if (swapNode.Attributes["id"] != null) 
             {
                 swapIDRef_ = swapNode.Attributes["id"].Value;
                 Swap ob = new Swap(swapNode);
                 IDManager.SetID(swapIDRef_, ob);
             }
             else if (swapNode.Attributes["href"] != null)
             {
                 swapIDRef_ = swapNode.Attributes["href"].Value;
             }
             else
             {
                 swap_ = new Swap(swapNode);
             }
         }
         else
         {
             swap_ = new Swap(swapNode);
         }
     }
     
 
     XmlNode swaptionNode = xmlNode.SelectSingleNode("swaption");
     
     if (swaptionNode != null)
     {
         if (swaptionNode.Attributes["href"] != null || swaptionNode.Attributes["id"] != null) 
         {
             if (swaptionNode.Attributes["id"] != null) 
             {
                 swaptionIDRef_ = swaptionNode.Attributes["id"].Value;
                 Swaption ob = new Swaption(swaptionNode);
                 IDManager.SetID(swaptionIDRef_, ob);
             }
             else if (swaptionNode.Attributes["href"] != null)
             {
                 swaptionIDRef_ = swaptionNode.Attributes["href"].Value;
             }
             else
             {
                 swaption_ = new Swaption(swaptionNode);
             }
         }
         else
         {
             swaption_ = new Swaption(swaptionNode);
         }
     }
     
 
     XmlNode equitySwapTransactionSupplementNode = xmlNode.SelectSingleNode("equitySwapTransactionSupplement");
     
     if (equitySwapTransactionSupplementNode != null)
     {
         if (equitySwapTransactionSupplementNode.Attributes["href"] != null || equitySwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (equitySwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["id"].Value;
                 EquitySwapTransactionSupplement ob = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
                 IDManager.SetID(equitySwapTransactionSupplementIDRef_, ob);
             }
             else if (equitySwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 equitySwapTransactionSupplementIDRef_ = equitySwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
             }
         }
         else
         {
             equitySwapTransactionSupplement_ = new EquitySwapTransactionSupplement(equitySwapTransactionSupplementNode);
         }
     }
     
 
     XmlNode standardProductNode = xmlNode.SelectSingleNode("standardProduct");
     
     if (standardProductNode != null)
     {
         if (standardProductNode.Attributes["href"] != null || standardProductNode.Attributes["id"] != null) 
         {
             if (standardProductNode.Attributes["id"] != null) 
             {
                 standardProductIDRef_ = standardProductNode.Attributes["id"].Value;
                 StandardProduct ob = new StandardProduct(standardProductNode);
                 IDManager.SetID(standardProductIDRef_, ob);
             }
             else if (standardProductNode.Attributes["href"] != null)
             {
                 standardProductIDRef_ = standardProductNode.Attributes["href"].Value;
             }
             else
             {
                 standardProduct_ = new StandardProduct(standardProductNode);
             }
         }
         else
         {
             standardProduct_ = new StandardProduct(standardProductNode);
         }
     }
     
 
     XmlNode varianceOptionTransactionSupplementNode = xmlNode.SelectSingleNode("varianceOptionTransactionSupplement");
     
     if (varianceOptionTransactionSupplementNode != null)
     {
         if (varianceOptionTransactionSupplementNode.Attributes["href"] != null || varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceOptionTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["id"].Value;
                 VarianceOptionTransactionSupplement ob = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
                 IDManager.SetID(varianceOptionTransactionSupplementIDRef_, ob);
             }
             else if (varianceOptionTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceOptionTransactionSupplementIDRef_ = varianceOptionTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
             }
         }
         else
         {
             varianceOptionTransactionSupplement_ = new VarianceOptionTransactionSupplement(varianceOptionTransactionSupplementNode);
         }
     }
     
 
     XmlNode varianceSwapNode = xmlNode.SelectSingleNode("varianceSwap");
     
     if (varianceSwapNode != null)
     {
         if (varianceSwapNode.Attributes["href"] != null || varianceSwapNode.Attributes["id"] != null) 
         {
             if (varianceSwapNode.Attributes["id"] != null) 
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["id"].Value;
                 VarianceSwap ob = new VarianceSwap(varianceSwapNode);
                 IDManager.SetID(varianceSwapIDRef_, ob);
             }
             else if (varianceSwapNode.Attributes["href"] != null)
             {
                 varianceSwapIDRef_ = varianceSwapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwap_ = new VarianceSwap(varianceSwapNode);
             }
         }
         else
         {
             varianceSwap_ = new VarianceSwap(varianceSwapNode);
         }
     }
     
 
     XmlNode varianceSwapTransactionSupplementNode = xmlNode.SelectSingleNode("varianceSwapTransactionSupplement");
     
     if (varianceSwapTransactionSupplementNode != null)
     {
         if (varianceSwapTransactionSupplementNode.Attributes["href"] != null || varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
         {
             if (varianceSwapTransactionSupplementNode.Attributes["id"] != null) 
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["id"].Value;
                 VarianceSwapTransactionSupplement ob = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
                 IDManager.SetID(varianceSwapTransactionSupplementIDRef_, ob);
             }
             else if (varianceSwapTransactionSupplementNode.Attributes["href"] != null)
             {
                 varianceSwapTransactionSupplementIDRef_ = varianceSwapTransactionSupplementNode.Attributes["href"].Value;
             }
             else
             {
                 varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
             }
         }
         else
         {
             varianceSwapTransactionSupplement_ = new VarianceSwapTransactionSupplement(varianceSwapTransactionSupplementNode);
         }
     }
     
 
     XmlNodeList otherPartyPaymentNodeList = xmlNode.SelectNodes("otherPartyPayment");
     
     if (otherPartyPaymentNodeList != null)
     {
         this.otherPartyPayment_ = new List<Payment>();
         foreach (XmlNode item in otherPartyPaymentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     otherPartyPaymentIDRef_ = item.Attributes["id"].Value;
                     otherPartyPayment_.Add(new Payment(item));
                     IDManager.SetID(otherPartyPaymentIDRef_, otherPartyPayment_[otherPartyPayment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     otherPartyPaymentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 otherPartyPayment_.Add(new Payment(item));
                 }
             }
             else
             {
                 otherPartyPayment_.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNodeList brokerPartyReferenceNodeList = xmlNode.SelectNodes("brokerPartyReference");
     
     if (brokerPartyReferenceNodeList != null)
     {
         this.brokerPartyReference_ = new List<PartyReference>();
         foreach (XmlNode item in brokerPartyReferenceNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     brokerPartyReferenceIDRef_ = item.Attributes["id"].Value;
                     brokerPartyReference_.Add(new PartyReference(item));
                     IDManager.SetID(brokerPartyReferenceIDRef_, brokerPartyReference_[brokerPartyReference_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     brokerPartyReferenceIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 brokerPartyReference_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 brokerPartyReference_.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNode calculationAgentNode = xmlNode.SelectSingleNode("calculationAgent");
     
     if (calculationAgentNode != null)
     {
         if (calculationAgentNode.Attributes["href"] != null || calculationAgentNode.Attributes["id"] != null) 
         {
             if (calculationAgentNode.Attributes["id"] != null) 
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["id"].Value;
                 CalculationAgent ob = new CalculationAgent(calculationAgentNode);
                 IDManager.SetID(calculationAgentIDRef_, ob);
             }
             else if (calculationAgentNode.Attributes["href"] != null)
             {
                 calculationAgentIDRef_ = calculationAgentNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgent_ = new CalculationAgent(calculationAgentNode);
             }
         }
         else
         {
             calculationAgent_ = new CalculationAgent(calculationAgentNode);
         }
     }
     
 
     XmlNode calculationAgentBusinessCenterNode = xmlNode.SelectSingleNode("calculationAgentBusinessCenter");
     
     if (calculationAgentBusinessCenterNode != null)
     {
         if (calculationAgentBusinessCenterNode.Attributes["href"] != null || calculationAgentBusinessCenterNode.Attributes["id"] != null) 
         {
             if (calculationAgentBusinessCenterNode.Attributes["id"] != null) 
             {
                 calculationAgentBusinessCenterIDRef_ = calculationAgentBusinessCenterNode.Attributes["id"].Value;
                 BusinessCenter ob = new BusinessCenter(calculationAgentBusinessCenterNode);
                 IDManager.SetID(calculationAgentBusinessCenterIDRef_, ob);
             }
             else if (calculationAgentBusinessCenterNode.Attributes["href"] != null)
             {
                 calculationAgentBusinessCenterIDRef_ = calculationAgentBusinessCenterNode.Attributes["href"].Value;
             }
             else
             {
                 calculationAgentBusinessCenter_ = new BusinessCenter(calculationAgentBusinessCenterNode);
             }
         }
         else
         {
             calculationAgentBusinessCenter_ = new BusinessCenter(calculationAgentBusinessCenterNode);
         }
     }
     
 
     XmlNodeList determiningPartyNodeList = xmlNode.SelectNodes("determiningParty");
     
     if (determiningPartyNodeList != null)
     {
         this.determiningParty_ = new List<PartyReference>();
         foreach (XmlNode item in determiningPartyNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     determiningPartyIDRef_ = item.Attributes["id"].Value;
                     determiningParty_.Add(new PartyReference(item));
                     IDManager.SetID(determiningPartyIDRef_, determiningParty_[determiningParty_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     determiningPartyIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 determiningParty_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 determiningParty_.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNodeList hedgingPartyNodeList = xmlNode.SelectNodes("hedgingParty");
     
     if (hedgingPartyNodeList != null)
     {
         this.hedgingParty_ = new List<PartyReference>();
         foreach (XmlNode item in hedgingPartyNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     hedgingPartyIDRef_ = item.Attributes["id"].Value;
                     hedgingParty_.Add(new PartyReference(item));
                     IDManager.SetID(hedgingPartyIDRef_, hedgingParty_[hedgingParty_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     hedgingPartyIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 hedgingParty_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 hedgingParty_.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNode collateralNode = xmlNode.SelectSingleNode("collateral");
     
     if (collateralNode != null)
     {
         if (collateralNode.Attributes["href"] != null || collateralNode.Attributes["id"] != null) 
         {
             if (collateralNode.Attributes["id"] != null) 
             {
                 collateralIDRef_ = collateralNode.Attributes["id"].Value;
                 Collateral ob = new Collateral(collateralNode);
                 IDManager.SetID(collateralIDRef_, ob);
             }
             else if (collateralNode.Attributes["href"] != null)
             {
                 collateralIDRef_ = collateralNode.Attributes["href"].Value;
             }
             else
             {
                 collateral_ = new Collateral(collateralNode);
             }
         }
         else
         {
             collateral_ = new Collateral(collateralNode);
         }
     }
     
 
     XmlNode documentationNode = xmlNode.SelectSingleNode("documentation");
     
     if (documentationNode != null)
     {
         if (documentationNode.Attributes["href"] != null || documentationNode.Attributes["id"] != null) 
         {
             if (documentationNode.Attributes["id"] != null) 
             {
                 documentationIDRef_ = documentationNode.Attributes["id"].Value;
                 Documentation ob = new Documentation(documentationNode);
                 IDManager.SetID(documentationIDRef_, ob);
             }
             else if (documentationNode.Attributes["href"] != null)
             {
                 documentationIDRef_ = documentationNode.Attributes["href"].Value;
             }
             else
             {
                 documentation_ = new Documentation(documentationNode);
             }
         }
         else
         {
             documentation_ = new Documentation(documentationNode);
         }
     }
     
 
     XmlNode governingLawNode = xmlNode.SelectSingleNode("governingLaw");
     
     if (governingLawNode != null)
     {
         if (governingLawNode.Attributes["href"] != null || governingLawNode.Attributes["id"] != null) 
         {
             if (governingLawNode.Attributes["id"] != null) 
             {
                 governingLawIDRef_ = governingLawNode.Attributes["id"].Value;
                 GoverningLaw ob = new GoverningLaw(governingLawNode);
                 IDManager.SetID(governingLawIDRef_, ob);
             }
             else if (governingLawNode.Attributes["href"] != null)
             {
                 governingLawIDRef_ = governingLawNode.Attributes["href"].Value;
             }
             else
             {
                 governingLaw_ = new GoverningLaw(governingLawNode);
             }
         }
         else
         {
             governingLaw_ = new GoverningLaw(governingLawNode);
         }
     }
     
 
     XmlNode allocationsNode = xmlNode.SelectSingleNode("allocations");
     
     if (allocationsNode != null)
     {
         if (allocationsNode.Attributes["href"] != null || allocationsNode.Attributes["id"] != null) 
         {
             if (allocationsNode.Attributes["id"] != null) 
             {
                 allocationsIDRef_ = allocationsNode.Attributes["id"].Value;
                 Allocations ob = new Allocations(allocationsNode);
                 IDManager.SetID(allocationsIDRef_, ob);
             }
             else if (allocationsNode.Attributes["href"] != null)
             {
                 allocationsIDRef_ = allocationsNode.Attributes["href"].Value;
             }
             else
             {
                 allocations_ = new Allocations(allocationsNode);
             }
         }
         else
         {
             allocations_ = new Allocations(allocationsNode);
         }
     }
     
 
 }
 public Trade(XmlNode xmlNode)
 {
     XmlNodeList tradeHeaderNodeList = xmlNode.SelectNodes("tradeHeader");
     if (tradeHeaderNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeHeaderNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeHeaderIDRef = item.Attributes["id"].Name;
                 TradeHeader ob = TradeHeader();
                 IDManager.SetID(tradeHeaderIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeHeaderIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeHeader = new TradeHeader(item);
             }
         }
     }
     
 
     XmlNodeList productNodeList = xmlNode.SelectNodes("product");
     if (productNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in productNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 productIDRef = item.Attributes["id"].Name;
                 Product ob = Product();
                 IDManager.SetID(productIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 productIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 product = new Product(item);
             }
         }
     }
     
 
     XmlNodeList forwardNodeList = xmlNode.SelectNodes("forward");
     if (forwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in forwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 forwardIDRef = item.Attributes["id"].Name;
                 ForwardSale ob = ForwardSale();
                 IDManager.SetID(forwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 forwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 forward = new ForwardSale(item);
             }
         }
     }
     
 
     XmlNodeList bondOptionNodeList = xmlNode.SelectNodes("bondOption");
     if (bondOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bondOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bondOptionIDRef = item.Attributes["id"].Name;
                 BondOption ob = BondOption();
                 IDManager.SetID(bondOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bondOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bondOption = new BondOption(item);
             }
         }
     }
     
 
     XmlNodeList creditDefaultSwapNodeList = xmlNode.SelectNodes("creditDefaultSwap");
     if (creditDefaultSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDefaultSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDefaultSwapIDRef = item.Attributes["id"].Name;
                 CreditDefaultSwap ob = CreditDefaultSwap();
                 IDManager.SetID(creditDefaultSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDefaultSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDefaultSwap = new CreditDefaultSwap(item);
             }
         }
     }
     
 
     XmlNodeList creditDefaultSwapOptionNodeList = xmlNode.SelectNodes("creditDefaultSwapOption");
     if (creditDefaultSwapOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDefaultSwapOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDefaultSwapOptionIDRef = item.Attributes["id"].Name;
                 CreditDefaultSwapOption ob = CreditDefaultSwapOption();
                 IDManager.SetID(creditDefaultSwapOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDefaultSwapOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDefaultSwapOption = new CreditDefaultSwapOption(item);
             }
         }
     }
     
 
     XmlNodeList commodityForwardNodeList = xmlNode.SelectNodes("commodityForward");
     if (commodityForwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityForwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityForwardIDRef = item.Attributes["id"].Name;
                 CommodityForward ob = CommodityForward();
                 IDManager.SetID(commodityForwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityForwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityForward = new CommodityForward(item);
             }
         }
     }
     
 
     XmlNodeList commodityOptionNodeList = xmlNode.SelectNodes("commodityOption");
     if (commodityOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commodityOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commodityOptionIDRef = item.Attributes["id"].Name;
                 CommodityOption ob = CommodityOption();
                 IDManager.SetID(commodityOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commodityOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commodityOption = new CommodityOption(item);
             }
         }
     }
     
 
     XmlNodeList commoditySwapNodeList = xmlNode.SelectNodes("commoditySwap");
     if (commoditySwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commoditySwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commoditySwapIDRef = item.Attributes["id"].Name;
                 CommoditySwap ob = CommoditySwap();
                 IDManager.SetID(commoditySwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commoditySwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commoditySwap = new CommoditySwap(item);
             }
         }
     }
     
 
     XmlNodeList commoditySwaptionNodeList = xmlNode.SelectNodes("commoditySwaption");
     if (commoditySwaptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in commoditySwaptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 commoditySwaptionIDRef = item.Attributes["id"].Name;
                 CommoditySwaption ob = CommoditySwaption();
                 IDManager.SetID(commoditySwaptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 commoditySwaptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 commoditySwaption = new CommoditySwaption(item);
             }
         }
     }
     
 
     XmlNodeList correlationSwapNodeList = xmlNode.SelectNodes("correlationSwap");
     if (correlationSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in correlationSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 correlationSwapIDRef = item.Attributes["id"].Name;
                 CorrelationSwap ob = CorrelationSwap();
                 IDManager.SetID(correlationSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 correlationSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 correlationSwap = new CorrelationSwap(item);
             }
         }
     }
     
 
     XmlNodeList dividendSwapOptionTransactionSupplementNodeList = xmlNode.SelectNodes("dividendSwapOptionTransactionSupplement");
     if (dividendSwapOptionTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendSwapOptionTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendSwapOptionTransactionSupplementIDRef = item.Attributes["id"].Name;
                 DividendSwapOptionTransactionSupplement ob = DividendSwapOptionTransactionSupplement();
                 IDManager.SetID(dividendSwapOptionTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendSwapOptionTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendSwapOptionTransactionSupplement = new DividendSwapOptionTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList dividendSwapTransactionSupplementNodeList = xmlNode.SelectNodes("dividendSwapTransactionSupplement");
     if (dividendSwapTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in dividendSwapTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 dividendSwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                 DividendSwapTransactionSupplement ob = DividendSwapTransactionSupplement();
                 IDManager.SetID(dividendSwapTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 dividendSwapTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 dividendSwapTransactionSupplement = new DividendSwapTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList instrumentTradeDetailsNodeList = xmlNode.SelectNodes("instrumentTradeDetails");
     if (instrumentTradeDetailsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in instrumentTradeDetailsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 instrumentTradeDetailsIDRef = item.Attributes["id"].Name;
                 InstrumentTradeDetails ob = InstrumentTradeDetails();
                 IDManager.SetID(instrumentTradeDetailsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 instrumentTradeDetailsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 instrumentTradeDetails = new InstrumentTradeDetails(item);
             }
         }
     }
     
 
     XmlNodeList strategyNodeList = xmlNode.SelectNodes("strategy");
     if (strategyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in strategyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 strategyIDRef = item.Attributes["id"].Name;
                 Strategy ob = Strategy();
                 IDManager.SetID(strategyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 strategyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 strategy = new Strategy(item);
             }
         }
     }
     
 
     XmlNodeList returnSwapNodeList = xmlNode.SelectNodes("returnSwap");
     if (returnSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in returnSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 returnSwapIDRef = item.Attributes["id"].Name;
                 ReturnSwap ob = ReturnSwap();
                 IDManager.SetID(returnSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 returnSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 returnSwap = new ReturnSwap(item);
             }
         }
     }
     
 
     XmlNodeList brokerEquityOptionNodeList = xmlNode.SelectNodes("brokerEquityOption");
     if (brokerEquityOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in brokerEquityOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 brokerEquityOptionIDRef = item.Attributes["id"].Name;
                 BrokerEquityOption ob = BrokerEquityOption();
                 IDManager.SetID(brokerEquityOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 brokerEquityOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 brokerEquityOption = new BrokerEquityOption(item);
             }
         }
     }
     
 
     XmlNodeList equityForwardNodeList = xmlNode.SelectNodes("equityForward");
     if (equityForwardNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityForwardNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityForwardIDRef = item.Attributes["id"].Name;
                 EquityForward ob = EquityForward();
                 IDManager.SetID(equityForwardIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityForwardIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityForward = new EquityForward(item);
             }
         }
     }
     
 
     XmlNodeList equityOptionNodeList = xmlNode.SelectNodes("equityOption");
     if (equityOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityOptionIDRef = item.Attributes["id"].Name;
                 EquityOption ob = EquityOption();
                 IDManager.SetID(equityOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityOption = new EquityOption(item);
             }
         }
     }
     
 
     XmlNodeList equityOptionTransactionSupplementNodeList = xmlNode.SelectNodes("equityOptionTransactionSupplement");
     if (equityOptionTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equityOptionTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equityOptionTransactionSupplementIDRef = item.Attributes["id"].Name;
                 EquityOptionTransactionSupplement ob = EquityOptionTransactionSupplement();
                 IDManager.SetID(equityOptionTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equityOptionTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equityOptionTransactionSupplement = new EquityOptionTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList fxSingleLegNodeList = xmlNode.SelectNodes("fxSingleLeg");
     if (fxSingleLegNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSingleLegNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSingleLegIDRef = item.Attributes["id"].Name;
                 FxSingleLeg ob = FxSingleLeg();
                 IDManager.SetID(fxSingleLegIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSingleLegIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSingleLeg = new FxSingleLeg(item);
             }
         }
     }
     
 
     XmlNodeList fxSwapNodeList = xmlNode.SelectNodes("fxSwap");
     if (fxSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxSwapIDRef = item.Attributes["id"].Name;
                 FxSwap ob = FxSwap();
                 IDManager.SetID(fxSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxSwap = new FxSwap(item);
             }
         }
     }
     
 
     XmlNodeList fxOptionNodeList = xmlNode.SelectNodes("fxOption");
     if (fxOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxOptionIDRef = item.Attributes["id"].Name;
                 FxOption ob = FxOption();
                 IDManager.SetID(fxOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxOption = new FxOption(item);
             }
         }
     }
     
 
     XmlNodeList fxDigitalOptionNodeList = xmlNode.SelectNodes("fxDigitalOption");
     if (fxDigitalOptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fxDigitalOptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fxDigitalOptionIDRef = item.Attributes["id"].Name;
                 FxDigitalOption ob = FxDigitalOption();
                 IDManager.SetID(fxDigitalOptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fxDigitalOptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fxDigitalOption = new FxDigitalOption(item);
             }
         }
     }
     
 
     XmlNodeList termDepositNodeList = xmlNode.SelectNodes("termDeposit");
     if (termDepositNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in termDepositNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 termDepositIDRef = item.Attributes["id"].Name;
                 TermDeposit ob = TermDeposit();
                 IDManager.SetID(termDepositIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 termDepositIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 termDeposit = new TermDeposit(item);
             }
         }
     }
     
 
     XmlNodeList genericProductNodeList = xmlNode.SelectNodes("genericProduct");
     if (genericProductNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in genericProductNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 genericProductIDRef = item.Attributes["id"].Name;
                 GenericProduct ob = GenericProduct();
                 IDManager.SetID(genericProductIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 genericProductIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 genericProduct = new GenericProduct(item);
             }
         }
     }
     
 
     XmlNodeList nonSchemaProductNodeList = xmlNode.SelectNodes("nonSchemaProduct");
     if (nonSchemaProductNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonSchemaProductNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonSchemaProductIDRef = item.Attributes["id"].Name;
                 GenericProduct ob = GenericProduct();
                 IDManager.SetID(nonSchemaProductIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonSchemaProductIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonSchemaProduct = new GenericProduct(item);
             }
         }
     }
     
 
     XmlNodeList bulletPaymentNodeList = xmlNode.SelectNodes("bulletPayment");
     if (bulletPaymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in bulletPaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 bulletPaymentIDRef = item.Attributes["id"].Name;
                 BulletPayment ob = BulletPayment();
                 IDManager.SetID(bulletPaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 bulletPaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 bulletPayment = new BulletPayment(item);
             }
         }
     }
     
 
     XmlNodeList capFloorNodeList = xmlNode.SelectNodes("capFloor");
     if (capFloorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in capFloorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 capFloorIDRef = item.Attributes["id"].Name;
                 CapFloor ob = CapFloor();
                 IDManager.SetID(capFloorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 capFloorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 capFloor = new CapFloor(item);
             }
         }
     }
     
 
     XmlNodeList fraNodeList = xmlNode.SelectNodes("fra");
     if (fraNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fraNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fraIDRef = item.Attributes["id"].Name;
                 Fra ob = Fra();
                 IDManager.SetID(fraIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fraIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fra = new Fra(item);
             }
         }
     }
     
 
     XmlNodeList swapNodeList = xmlNode.SelectNodes("swap");
     if (swapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swapIDRef = item.Attributes["id"].Name;
                 Swap ob = Swap();
                 IDManager.SetID(swapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swap = new Swap(item);
             }
         }
     }
     
 
     XmlNodeList swaptionNodeList = xmlNode.SelectNodes("swaption");
     if (swaptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in swaptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 swaptionIDRef = item.Attributes["id"].Name;
                 Swaption ob = Swaption();
                 IDManager.SetID(swaptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 swaptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 swaption = new Swaption(item);
             }
         }
     }
     
 
     XmlNodeList equitySwapTransactionSupplementNodeList = xmlNode.SelectNodes("equitySwapTransactionSupplement");
     if (equitySwapTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in equitySwapTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 equitySwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                 EquitySwapTransactionSupplement ob = EquitySwapTransactionSupplement();
                 IDManager.SetID(equitySwapTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 equitySwapTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 equitySwapTransactionSupplement = new EquitySwapTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList standardProductNodeList = xmlNode.SelectNodes("standardProduct");
     if (standardProductNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in standardProductNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 standardProductIDRef = item.Attributes["id"].Name;
                 StandardProduct ob = StandardProduct();
                 IDManager.SetID(standardProductIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 standardProductIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 standardProduct = new StandardProduct(item);
             }
         }
     }
     
 
     XmlNodeList varianceOptionTransactionSupplementNodeList = xmlNode.SelectNodes("varianceOptionTransactionSupplement");
     if (varianceOptionTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceOptionTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceOptionTransactionSupplementIDRef = item.Attributes["id"].Name;
                 VarianceOptionTransactionSupplement ob = VarianceOptionTransactionSupplement();
                 IDManager.SetID(varianceOptionTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceOptionTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceOptionTransactionSupplement = new VarianceOptionTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList varianceSwapNodeList = xmlNode.SelectNodes("varianceSwap");
     if (varianceSwapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceSwapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceSwapIDRef = item.Attributes["id"].Name;
                 VarianceSwap ob = VarianceSwap();
                 IDManager.SetID(varianceSwapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceSwapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceSwap = new VarianceSwap(item);
             }
         }
     }
     
 
     XmlNodeList varianceSwapTransactionSupplementNodeList = xmlNode.SelectNodes("varianceSwapTransactionSupplement");
     if (varianceSwapTransactionSupplementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceSwapTransactionSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceSwapTransactionSupplementIDRef = item.Attributes["id"].Name;
                 VarianceSwapTransactionSupplement ob = VarianceSwapTransactionSupplement();
                 IDManager.SetID(varianceSwapTransactionSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceSwapTransactionSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceSwapTransactionSupplement = new VarianceSwapTransactionSupplement(item);
             }
         }
     }
     
 
     XmlNodeList otherPartyPaymentNodeList = xmlNode.SelectNodes("otherPartyPayment");
     
     foreach (XmlNode item in otherPartyPaymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherPartyPaymentIDRef = item.Attributes["id"].Name;
                 List<Payment> ob = new List<Payment>();
                 ob.Add(new Payment(item));
                 IDManager.SetID(otherPartyPaymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherPartyPaymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
             otherPartyPayment.Add(new Payment(item));
             }
         }
     }
     
 
     XmlNodeList brokerPartyReferenceNodeList = xmlNode.SelectNodes("brokerPartyReference");
     
     foreach (XmlNode item in brokerPartyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 brokerPartyReferenceIDRef = item.Attributes["id"].Name;
                 List<PartyReference> ob = new List<PartyReference>();
                 ob.Add(new PartyReference(item));
                 IDManager.SetID(brokerPartyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 brokerPartyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
             brokerPartyReference.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNodeList calculationAgentNodeList = xmlNode.SelectNodes("calculationAgent");
     if (calculationAgentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationAgentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationAgentIDRef = item.Attributes["id"].Name;
                 CalculationAgent ob = CalculationAgent();
                 IDManager.SetID(calculationAgentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationAgentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationAgent = new CalculationAgent(item);
             }
         }
     }
     
 
     XmlNodeList calculationAgentBusinessCenterNodeList = xmlNode.SelectNodes("calculationAgentBusinessCenter");
     if (calculationAgentBusinessCenterNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in calculationAgentBusinessCenterNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 calculationAgentBusinessCenterIDRef = item.Attributes["id"].Name;
                 BusinessCenter ob = BusinessCenter();
                 IDManager.SetID(calculationAgentBusinessCenterIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 calculationAgentBusinessCenterIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 calculationAgentBusinessCenter = new BusinessCenter(item);
             }
         }
     }
     
 
     XmlNodeList determiningPartyNodeList = xmlNode.SelectNodes("determiningParty");
     
     foreach (XmlNode item in determiningPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 determiningPartyIDRef = item.Attributes["id"].Name;
                 List<PartyReference> ob = new List<PartyReference>();
                 ob.Add(new PartyReference(item));
                 IDManager.SetID(determiningPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 determiningPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
             determiningParty.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNodeList hedgingPartyNodeList = xmlNode.SelectNodes("hedgingParty");
     
     foreach (XmlNode item in hedgingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 hedgingPartyIDRef = item.Attributes["id"].Name;
                 List<PartyReference> ob = new List<PartyReference>();
                 ob.Add(new PartyReference(item));
                 IDManager.SetID(hedgingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 hedgingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
             hedgingParty.Add(new PartyReference(item));
             }
         }
     }
     
 
     XmlNodeList collateralNodeList = xmlNode.SelectNodes("collateral");
     if (collateralNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in collateralNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 collateralIDRef = item.Attributes["id"].Name;
                 Collateral ob = Collateral();
                 IDManager.SetID(collateralIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 collateralIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 collateral = new Collateral(item);
             }
         }
     }
     
 
     XmlNodeList documentationNodeList = xmlNode.SelectNodes("documentation");
     if (documentationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in documentationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 documentationIDRef = item.Attributes["id"].Name;
                 Documentation ob = Documentation();
                 IDManager.SetID(documentationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 documentationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 documentation = new Documentation(item);
             }
         }
     }
     
 
     XmlNodeList governingLawNodeList = xmlNode.SelectNodes("governingLaw");
     if (governingLawNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in governingLawNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 governingLawIDRef = item.Attributes["id"].Name;
                 GoverningLaw ob = GoverningLaw();
                 IDManager.SetID(governingLawIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 governingLawIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 governingLaw = new GoverningLaw(item);
             }
         }
     }
     
 
     XmlNodeList allocationsNodeList = xmlNode.SelectNodes("allocations");
     if (allocationsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in allocationsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 allocationsIDRef = item.Attributes["id"].Name;
                 Allocations ob = Allocations();
                 IDManager.SetID(allocationsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 allocationsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 allocations = new Allocations(item);
             }
         }
     }
     
 
 }