public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     foreach (XmlNode item in newTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(newTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             newTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList newTradeNodeList = xmlNode.SelectNodes("newTrade");
     if (newTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in newTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 newTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(newTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 newTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 newTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     foreach (XmlNode item in oldTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(oldTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             oldTradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList oldTradeNodeList = xmlNode.SelectNodes("oldTrade");
     if (oldTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in oldTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 oldTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(oldTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 oldTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 oldTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeIdentifierNodeList = xmlNode.SelectNodes("feeTradeIdentifier");
     if (feeTradeIdentifierNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef = item.Attributes["id"].Name;
                 PartyTradeIdentifier ob = PartyTradeIdentifier();
                 IDManager.SetID(feeTradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTradeIdentifier = new PartyTradeIdentifier(item);
             }
         }
     }
     
 
     XmlNodeList feeTradeNodeList = xmlNode.SelectNodes("feeTrade");
     if (feeTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in feeTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 feeTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(feeTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 feeTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 feeTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList transferorNodeList = xmlNode.SelectNodes("transferor");
     if (transferorNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transferorIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferor = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transferorAccountNodeList = xmlNode.SelectNodes("transferorAccount");
     if (transferorAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transferorAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transferorAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transferorAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transferorAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferorAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeNodeList = xmlNode.SelectNodes("transferee");
     if (transfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(transfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeNodeList = xmlNode.SelectNodes("otherTransferee");
     if (otherTransfereeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherTransfereeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransferee = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList transfereeAccountNodeList = xmlNode.SelectNodes("transfereeAccount");
     if (transfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in transfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(transfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 transfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 transfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherTransfereeAccountNodeList = xmlNode.SelectNodes("otherTransfereeAccount");
     if (otherTransfereeAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherTransfereeAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherTransfereeAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherTransfereeAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherTransfereeAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyNodeList = xmlNode.SelectNodes("remainingParty");
     if (remainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(remainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList remainingPartyAccountNodeList = xmlNode.SelectNodes("remainingPartyAccount");
     if (remainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(remainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyNodeList = xmlNode.SelectNodes("otherRemainingParty");
     if (otherRemainingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(otherRemainingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingParty = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList otherRemainingPartyAccountNodeList = xmlNode.SelectNodes("otherRemainingPartyAccount");
     if (otherRemainingPartyAccountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in otherRemainingPartyAccountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(otherRemainingPartyAccountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 otherRemainingPartyAccountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 otherRemainingPartyAccount = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList novationDateNodeList = xmlNode.SelectNodes("novationDate");
     if (novationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");
     if (executionDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef = item.Attributes["id"].Name;
                 ExecutionDateTime ob = ExecutionDateTime();
                 IDManager.SetID(executionDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionDateTime = new ExecutionDateTime(item);
             }
         }
     }
     
 
     XmlNodeList novationTradeDateNodeList = xmlNode.SelectNodes("novationTradeDate");
     if (novationTradeDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novationTradeDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(novationTradeDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novationTradeDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novationTradeDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     foreach (XmlNode item in novatedAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(novatedAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             novatedAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     foreach (XmlNode item in remainingAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingAmountIDRef = item.Attributes["id"].Name;
                 List<Money> ob = new List<Money>();
                 ob.Add(new Money(item));
                 IDManager.SetID(remainingAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
             remainingAmount.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfOptionsNodeList = xmlNode.SelectNodes("novatedNumberOfOptions");
     if (novatedNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfOptionsNodeList = xmlNode.SelectNodes("remainingNumberOfOptions");
     if (remainingNumberOfOptionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfOptionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfOptionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfOptionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfOptions = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList novatedNumberOfUnitsNodeList = xmlNode.SelectNodes("novatedNumberOfUnits");
     if (novatedNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in novatedNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(novatedNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 novatedNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 novatedNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList remainingNumberOfUnitsNodeList = xmlNode.SelectNodes("remainingNumberOfUnits");
     if (remainingNumberOfUnitsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in remainingNumberOfUnitsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(remainingNumberOfUnitsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 remainingNumberOfUnitsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 remainingNumberOfUnits = new XsdTypeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList fullFirstCalculationPeriodNodeList = xmlNode.SelectNodes("fullFirstCalculationPeriod");
     if (fullFirstCalculationPeriodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in fullFirstCalculationPeriodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(fullFirstCalculationPeriodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 fullFirstCalculationPeriodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 fullFirstCalculationPeriod = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     foreach (XmlNode item in firstPeriodStartDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstPeriodStartDateIDRef = item.Attributes["id"].Name;
                 List<FirstPeriodStartDate> ob = new List<FirstPeriodStartDate>();
                 ob.Add(new FirstPeriodStartDate(item));
                 IDManager.SetID(firstPeriodStartDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstPeriodStartDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
             firstPeriodStartDate.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNodeList nonRelianceNodeList = xmlNode.SelectNodes("nonReliance");
     if (nonRelianceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonRelianceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonRelianceIDRef = item.Attributes["id"].Name;
                 Empty ob = Empty();
                 IDManager.SetID(nonRelianceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonRelianceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonReliance = new Empty(item);
             }
         }
     }
     
 
     XmlNodeList creditDerivativesNoticesNodeList = xmlNode.SelectNodes("creditDerivativesNotices");
     if (creditDerivativesNoticesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditDerivativesNoticesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef = item.Attributes["id"].Name;
                 CreditDerivativesNotices ob = CreditDerivativesNotices();
                 IDManager.SetID(creditDerivativesNoticesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditDerivativesNoticesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditDerivativesNotices = new CreditDerivativesNotices(item);
             }
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     foreach (XmlNode item in contractualDefinitionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualDefinitionsIDRef = item.Attributes["id"].Name;
                 List<ContractualDefinitions> ob = new List<ContractualDefinitions>();
                 ob.Add(new ContractualDefinitions(item));
                 IDManager.SetID(contractualDefinitionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualDefinitionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualDefinitions.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     foreach (XmlNode item in contractualTermsSupplementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualTermsSupplementIDRef = item.Attributes["id"].Name;
                 List<ContractualTermsSupplement> ob = new List<ContractualTermsSupplement>();
                 ob.Add(new ContractualTermsSupplement(item));
                 IDManager.SetID(contractualTermsSupplementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualTermsSupplementIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualTermsSupplement.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     if (paymentNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 Payment ob = Payment();
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 payment = new Payment(item);
             }
         }
     }
     
 
 }
 public TradeNovationContent(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList newTradeIdentifierNodeList = xmlNode.SelectNodes("newTradeIdentifier");
     
     if (newTradeIdentifierNodeList != null)
     {
         this.newTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in newTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(newTradeIdentifierIDRef_, newTradeIdentifier_[newTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     newTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 newTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode newTradeNode = xmlNode.SelectSingleNode("newTrade");
     
     if (newTradeNode != null)
     {
         if (newTradeNode.Attributes["href"] != null || newTradeNode.Attributes["id"] != null) 
         {
             if (newTradeNode.Attributes["id"] != null) 
             {
                 newTradeIDRef_ = newTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(newTradeNode);
                 IDManager.SetID(newTradeIDRef_, ob);
             }
             else if (newTradeNode.Attributes["href"] != null)
             {
                 newTradeIDRef_ = newTradeNode.Attributes["href"].Value;
             }
             else
             {
                 newTrade_ = new Trade(newTradeNode);
             }
         }
         else
         {
             newTrade_ = new Trade(newTradeNode);
         }
     }
     
 
     XmlNodeList oldTradeIdentifierNodeList = xmlNode.SelectNodes("oldTradeIdentifier");
     
     if (oldTradeIdentifierNodeList != null)
     {
         this.oldTradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in oldTradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(oldTradeIdentifierIDRef_, oldTradeIdentifier_[oldTradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     oldTradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 oldTradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode oldTradeNode = xmlNode.SelectSingleNode("oldTrade");
     
     if (oldTradeNode != null)
     {
         if (oldTradeNode.Attributes["href"] != null || oldTradeNode.Attributes["id"] != null) 
         {
             if (oldTradeNode.Attributes["id"] != null) 
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(oldTradeNode);
                 IDManager.SetID(oldTradeIDRef_, ob);
             }
             else if (oldTradeNode.Attributes["href"] != null)
             {
                 oldTradeIDRef_ = oldTradeNode.Attributes["href"].Value;
             }
             else
             {
                 oldTrade_ = new Trade(oldTradeNode);
             }
         }
         else
         {
             oldTrade_ = new Trade(oldTradeNode);
         }
     }
     
 
     XmlNode feeTradeIdentifierNode = xmlNode.SelectSingleNode("feeTradeIdentifier");
     
     if (feeTradeIdentifierNode != null)
     {
         if (feeTradeIdentifierNode.Attributes["href"] != null || feeTradeIdentifierNode.Attributes["id"] != null) 
         {
             if (feeTradeIdentifierNode.Attributes["id"] != null) 
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["id"].Value;
                 PartyTradeIdentifier ob = new PartyTradeIdentifier(feeTradeIdentifierNode);
                 IDManager.SetID(feeTradeIdentifierIDRef_, ob);
             }
             else if (feeTradeIdentifierNode.Attributes["href"] != null)
             {
                 feeTradeIdentifierIDRef_ = feeTradeIdentifierNode.Attributes["href"].Value;
             }
             else
             {
                 feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
             }
         }
         else
         {
             feeTradeIdentifier_ = new PartyTradeIdentifier(feeTradeIdentifierNode);
         }
     }
     
 
     XmlNode feeTradeNode = xmlNode.SelectSingleNode("feeTrade");
     
     if (feeTradeNode != null)
     {
         if (feeTradeNode.Attributes["href"] != null || feeTradeNode.Attributes["id"] != null) 
         {
             if (feeTradeNode.Attributes["id"] != null) 
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(feeTradeNode);
                 IDManager.SetID(feeTradeIDRef_, ob);
             }
             else if (feeTradeNode.Attributes["href"] != null)
             {
                 feeTradeIDRef_ = feeTradeNode.Attributes["href"].Value;
             }
             else
             {
                 feeTrade_ = new Trade(feeTradeNode);
             }
         }
         else
         {
             feeTrade_ = new Trade(feeTradeNode);
         }
     }
     
 
     XmlNode transferorNode = xmlNode.SelectSingleNode("transferor");
     
     if (transferorNode != null)
     {
         if (transferorNode.Attributes["href"] != null || transferorNode.Attributes["id"] != null) 
         {
             if (transferorNode.Attributes["id"] != null) 
             {
                 transferorIDRef_ = transferorNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transferorNode);
                 IDManager.SetID(transferorIDRef_, ob);
             }
             else if (transferorNode.Attributes["href"] != null)
             {
                 transferorIDRef_ = transferorNode.Attributes["href"].Value;
             }
             else
             {
                 transferor_ = new PartyReference(transferorNode);
             }
         }
         else
         {
             transferor_ = new PartyReference(transferorNode);
         }
     }
     
 
     XmlNode transferorAccountNode = xmlNode.SelectSingleNode("transferorAccount");
     
     if (transferorAccountNode != null)
     {
         if (transferorAccountNode.Attributes["href"] != null || transferorAccountNode.Attributes["id"] != null) 
         {
             if (transferorAccountNode.Attributes["id"] != null) 
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transferorAccountNode);
                 IDManager.SetID(transferorAccountIDRef_, ob);
             }
             else if (transferorAccountNode.Attributes["href"] != null)
             {
                 transferorAccountIDRef_ = transferorAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transferorAccount_ = new AccountReference(transferorAccountNode);
             }
         }
         else
         {
             transferorAccount_ = new AccountReference(transferorAccountNode);
         }
     }
     
 
     XmlNode transfereeNode = xmlNode.SelectSingleNode("transferee");
     
     if (transfereeNode != null)
     {
         if (transfereeNode.Attributes["href"] != null || transfereeNode.Attributes["id"] != null) 
         {
             if (transfereeNode.Attributes["id"] != null) 
             {
                 transfereeIDRef_ = transfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(transfereeNode);
                 IDManager.SetID(transfereeIDRef_, ob);
             }
             else if (transfereeNode.Attributes["href"] != null)
             {
                 transfereeIDRef_ = transfereeNode.Attributes["href"].Value;
             }
             else
             {
                 transferee_ = new PartyReference(transfereeNode);
             }
         }
         else
         {
             transferee_ = new PartyReference(transfereeNode);
         }
     }
     
 
     XmlNode otherTransfereeNode = xmlNode.SelectSingleNode("otherTransferee");
     
     if (otherTransfereeNode != null)
     {
         if (otherTransfereeNode.Attributes["href"] != null || otherTransfereeNode.Attributes["id"] != null) 
         {
             if (otherTransfereeNode.Attributes["id"] != null) 
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherTransfereeNode);
                 IDManager.SetID(otherTransfereeIDRef_, ob);
             }
             else if (otherTransfereeNode.Attributes["href"] != null)
             {
                 otherTransfereeIDRef_ = otherTransfereeNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransferee_ = new PartyReference(otherTransfereeNode);
             }
         }
         else
         {
             otherTransferee_ = new PartyReference(otherTransfereeNode);
         }
     }
     
 
     XmlNode transfereeAccountNode = xmlNode.SelectSingleNode("transfereeAccount");
     
     if (transfereeAccountNode != null)
     {
         if (transfereeAccountNode.Attributes["href"] != null || transfereeAccountNode.Attributes["id"] != null) 
         {
             if (transfereeAccountNode.Attributes["id"] != null) 
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(transfereeAccountNode);
                 IDManager.SetID(transfereeAccountIDRef_, ob);
             }
             else if (transfereeAccountNode.Attributes["href"] != null)
             {
                 transfereeAccountIDRef_ = transfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 transfereeAccount_ = new AccountReference(transfereeAccountNode);
             }
         }
         else
         {
             transfereeAccount_ = new AccountReference(transfereeAccountNode);
         }
     }
     
 
     XmlNode otherTransfereeAccountNode = xmlNode.SelectSingleNode("otherTransfereeAccount");
     
     if (otherTransfereeAccountNode != null)
     {
         if (otherTransfereeAccountNode.Attributes["href"] != null || otherTransfereeAccountNode.Attributes["id"] != null) 
         {
             if (otherTransfereeAccountNode.Attributes["id"] != null) 
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherTransfereeAccountNode);
                 IDManager.SetID(otherTransfereeAccountIDRef_, ob);
             }
             else if (otherTransfereeAccountNode.Attributes["href"] != null)
             {
                 otherTransfereeAccountIDRef_ = otherTransfereeAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
             }
         }
         else
         {
             otherTransfereeAccount_ = new AccountReference(otherTransfereeAccountNode);
         }
     }
     
 
     XmlNode remainingPartyNode = xmlNode.SelectSingleNode("remainingParty");
     
     if (remainingPartyNode != null)
     {
         if (remainingPartyNode.Attributes["href"] != null || remainingPartyNode.Attributes["id"] != null) 
         {
             if (remainingPartyNode.Attributes["id"] != null) 
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(remainingPartyNode);
                 IDManager.SetID(remainingPartyIDRef_, ob);
             }
             else if (remainingPartyNode.Attributes["href"] != null)
             {
                 remainingPartyIDRef_ = remainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 remainingParty_ = new PartyReference(remainingPartyNode);
             }
         }
         else
         {
             remainingParty_ = new PartyReference(remainingPartyNode);
         }
     }
     
 
     XmlNode remainingPartyAccountNode = xmlNode.SelectSingleNode("remainingPartyAccount");
     
     if (remainingPartyAccountNode != null)
     {
         if (remainingPartyAccountNode.Attributes["href"] != null || remainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (remainingPartyAccountNode.Attributes["id"] != null) 
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(remainingPartyAccountNode);
                 IDManager.SetID(remainingPartyAccountIDRef_, ob);
             }
             else if (remainingPartyAccountNode.Attributes["href"] != null)
             {
                 remainingPartyAccountIDRef_ = remainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
             }
         }
         else
         {
             remainingPartyAccount_ = new AccountReference(remainingPartyAccountNode);
         }
     }
     
 
     XmlNode otherRemainingPartyNode = xmlNode.SelectSingleNode("otherRemainingParty");
     
     if (otherRemainingPartyNode != null)
     {
         if (otherRemainingPartyNode.Attributes["href"] != null || otherRemainingPartyNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(otherRemainingPartyNode);
                 IDManager.SetID(otherRemainingPartyIDRef_, ob);
             }
             else if (otherRemainingPartyNode.Attributes["href"] != null)
             {
                 otherRemainingPartyIDRef_ = otherRemainingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
             }
         }
         else
         {
             otherRemainingParty_ = new PartyReference(otherRemainingPartyNode);
         }
     }
     
 
     XmlNode otherRemainingPartyAccountNode = xmlNode.SelectSingleNode("otherRemainingPartyAccount");
     
     if (otherRemainingPartyAccountNode != null)
     {
         if (otherRemainingPartyAccountNode.Attributes["href"] != null || otherRemainingPartyAccountNode.Attributes["id"] != null) 
         {
             if (otherRemainingPartyAccountNode.Attributes["id"] != null) 
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(otherRemainingPartyAccountNode);
                 IDManager.SetID(otherRemainingPartyAccountIDRef_, ob);
             }
             else if (otherRemainingPartyAccountNode.Attributes["href"] != null)
             {
                 otherRemainingPartyAccountIDRef_ = otherRemainingPartyAccountNode.Attributes["href"].Value;
             }
             else
             {
                 otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
             }
         }
         else
         {
             otherRemainingPartyAccount_ = new AccountReference(otherRemainingPartyAccountNode);
         }
     }
     
 
     XmlNode novationDateNode = xmlNode.SelectSingleNode("novationDate");
     
     if (novationDateNode != null)
     {
         if (novationDateNode.Attributes["href"] != null || novationDateNode.Attributes["id"] != null) 
         {
             if (novationDateNode.Attributes["id"] != null) 
             {
                 novationDateIDRef_ = novationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationDateNode);
                 IDManager.SetID(novationDateIDRef_, ob);
             }
             else if (novationDateNode.Attributes["href"] != null)
             {
                 novationDateIDRef_ = novationDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationDate_ = new XsdTypeDate(novationDateNode);
             }
         }
         else
         {
             novationDate_ = new XsdTypeDate(novationDateNode);
         }
     }
     
 
     XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");
     
     if (executionDateTimeNode != null)
     {
         if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null) 
         {
             if (executionDateTimeNode.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                 ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                 IDManager.SetID(executionDateTimeIDRef_, ob);
             }
             else if (executionDateTimeNode.Attributes["href"] != null)
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
             }
         }
         else
         {
             executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
         }
     }
     
 
     XmlNode novationTradeDateNode = xmlNode.SelectSingleNode("novationTradeDate");
     
     if (novationTradeDateNode != null)
     {
         if (novationTradeDateNode.Attributes["href"] != null || novationTradeDateNode.Attributes["id"] != null) 
         {
             if (novationTradeDateNode.Attributes["id"] != null) 
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(novationTradeDateNode);
                 IDManager.SetID(novationTradeDateIDRef_, ob);
             }
             else if (novationTradeDateNode.Attributes["href"] != null)
             {
                 novationTradeDateIDRef_ = novationTradeDateNode.Attributes["href"].Value;
             }
             else
             {
                 novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
             }
         }
         else
         {
             novationTradeDate_ = new XsdTypeDate(novationTradeDateNode);
         }
     }
     
 
     XmlNodeList novatedAmountNodeList = xmlNode.SelectNodes("novatedAmount");
     
     if (novatedAmountNodeList != null)
     {
         this.novatedAmount_ = new List<Money>();
         foreach (XmlNode item in novatedAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     novatedAmountIDRef_ = item.Attributes["id"].Value;
                     novatedAmount_.Add(new Money(item));
                     IDManager.SetID(novatedAmountIDRef_, novatedAmount_[novatedAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     novatedAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 novatedAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 novatedAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNodeList remainingAmountNodeList = xmlNode.SelectNodes("remainingAmount");
     
     if (remainingAmountNodeList != null)
     {
         this.remainingAmount_ = new List<Money>();
         foreach (XmlNode item in remainingAmountNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     remainingAmountIDRef_ = item.Attributes["id"].Value;
                     remainingAmount_.Add(new Money(item));
                     IDManager.SetID(remainingAmountIDRef_, remainingAmount_[remainingAmount_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     remainingAmountIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 remainingAmount_.Add(new Money(item));
                 }
             }
             else
             {
                 remainingAmount_.Add(new Money(item));
             }
         }
     }
     
 
     XmlNode novatedNumberOfOptionsNode = xmlNode.SelectSingleNode("novatedNumberOfOptions");
     
     if (novatedNumberOfOptionsNode != null)
     {
         if (novatedNumberOfOptionsNode.Attributes["href"] != null || novatedNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfOptionsNode);
                 IDManager.SetID(novatedNumberOfOptionsIDRef_, ob);
             }
             else if (novatedNumberOfOptionsNode.Attributes["href"] != null)
             {
                 novatedNumberOfOptionsIDRef_ = novatedNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
             }
         }
         else
         {
             novatedNumberOfOptions_ = new XsdTypeDecimal(novatedNumberOfOptionsNode);
         }
     }
     
 
     XmlNode remainingNumberOfOptionsNode = xmlNode.SelectSingleNode("remainingNumberOfOptions");
     
     if (remainingNumberOfOptionsNode != null)
     {
         if (remainingNumberOfOptionsNode.Attributes["href"] != null || remainingNumberOfOptionsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfOptionsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfOptionsNode);
                 IDManager.SetID(remainingNumberOfOptionsIDRef_, ob);
             }
             else if (remainingNumberOfOptionsNode.Attributes["href"] != null)
             {
                 remainingNumberOfOptionsIDRef_ = remainingNumberOfOptionsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
             }
         }
         else
         {
             remainingNumberOfOptions_ = new XsdTypeDecimal(remainingNumberOfOptionsNode);
         }
     }
     
 
     XmlNode novatedNumberOfUnitsNode = xmlNode.SelectSingleNode("novatedNumberOfUnits");
     
     if (novatedNumberOfUnitsNode != null)
     {
         if (novatedNumberOfUnitsNode.Attributes["href"] != null || novatedNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (novatedNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(novatedNumberOfUnitsNode);
                 IDManager.SetID(novatedNumberOfUnitsIDRef_, ob);
             }
             else if (novatedNumberOfUnitsNode.Attributes["href"] != null)
             {
                 novatedNumberOfUnitsIDRef_ = novatedNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
             }
         }
         else
         {
             novatedNumberOfUnits_ = new XsdTypeDecimal(novatedNumberOfUnitsNode);
         }
     }
     
 
     XmlNode remainingNumberOfUnitsNode = xmlNode.SelectSingleNode("remainingNumberOfUnits");
     
     if (remainingNumberOfUnitsNode != null)
     {
         if (remainingNumberOfUnitsNode.Attributes["href"] != null || remainingNumberOfUnitsNode.Attributes["id"] != null) 
         {
             if (remainingNumberOfUnitsNode.Attributes["id"] != null) 
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(remainingNumberOfUnitsNode);
                 IDManager.SetID(remainingNumberOfUnitsIDRef_, ob);
             }
             else if (remainingNumberOfUnitsNode.Attributes["href"] != null)
             {
                 remainingNumberOfUnitsIDRef_ = remainingNumberOfUnitsNode.Attributes["href"].Value;
             }
             else
             {
                 remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
             }
         }
         else
         {
             remainingNumberOfUnits_ = new XsdTypeDecimal(remainingNumberOfUnitsNode);
         }
     }
     
 
     XmlNode fullFirstCalculationPeriodNode = xmlNode.SelectSingleNode("fullFirstCalculationPeriod");
     
     if (fullFirstCalculationPeriodNode != null)
     {
         if (fullFirstCalculationPeriodNode.Attributes["href"] != null || fullFirstCalculationPeriodNode.Attributes["id"] != null) 
         {
             if (fullFirstCalculationPeriodNode.Attributes["id"] != null) 
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
                 IDManager.SetID(fullFirstCalculationPeriodIDRef_, ob);
             }
             else if (fullFirstCalculationPeriodNode.Attributes["href"] != null)
             {
                 fullFirstCalculationPeriodIDRef_ = fullFirstCalculationPeriodNode.Attributes["href"].Value;
             }
             else
             {
                 fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
             }
         }
         else
         {
             fullFirstCalculationPeriod_ = new XsdTypeBoolean(fullFirstCalculationPeriodNode);
         }
     }
     
 
     XmlNodeList firstPeriodStartDateNodeList = xmlNode.SelectNodes("firstPeriodStartDate");
     
     if (firstPeriodStartDateNodeList != null)
     {
         this.firstPeriodStartDate_ = new List<FirstPeriodStartDate>();
         foreach (XmlNode item in firstPeriodStartDateNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["id"].Value;
                     firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                     IDManager.SetID(firstPeriodStartDateIDRef_, firstPeriodStartDate_[firstPeriodStartDate_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     firstPeriodStartDateIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
                 }
             }
             else
             {
                 firstPeriodStartDate_.Add(new FirstPeriodStartDate(item));
             }
         }
     }
     
 
     XmlNode nonRelianceNode = xmlNode.SelectSingleNode("nonReliance");
     
     if (nonRelianceNode != null)
     {
         if (nonRelianceNode.Attributes["href"] != null || nonRelianceNode.Attributes["id"] != null) 
         {
             if (nonRelianceNode.Attributes["id"] != null) 
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["id"].Value;
                 Empty ob = new Empty(nonRelianceNode);
                 IDManager.SetID(nonRelianceIDRef_, ob);
             }
             else if (nonRelianceNode.Attributes["href"] != null)
             {
                 nonRelianceIDRef_ = nonRelianceNode.Attributes["href"].Value;
             }
             else
             {
                 nonReliance_ = new Empty(nonRelianceNode);
             }
         }
         else
         {
             nonReliance_ = new Empty(nonRelianceNode);
         }
     }
     
 
     XmlNode creditDerivativesNoticesNode = xmlNode.SelectSingleNode("creditDerivativesNotices");
     
     if (creditDerivativesNoticesNode != null)
     {
         if (creditDerivativesNoticesNode.Attributes["href"] != null || creditDerivativesNoticesNode.Attributes["id"] != null) 
         {
             if (creditDerivativesNoticesNode.Attributes["id"] != null) 
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["id"].Value;
                 CreditDerivativesNotices ob = new CreditDerivativesNotices(creditDerivativesNoticesNode);
                 IDManager.SetID(creditDerivativesNoticesIDRef_, ob);
             }
             else if (creditDerivativesNoticesNode.Attributes["href"] != null)
             {
                 creditDerivativesNoticesIDRef_ = creditDerivativesNoticesNode.Attributes["href"].Value;
             }
             else
             {
                 creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
             }
         }
         else
         {
             creditDerivativesNotices_ = new CreditDerivativesNotices(creditDerivativesNoticesNode);
         }
     }
     
 
     XmlNodeList contractualDefinitionsNodeList = xmlNode.SelectNodes("contractualDefinitions");
     
     if (contractualDefinitionsNodeList != null)
     {
         this.contractualDefinitions_ = new List<ContractualDefinitions>();
         foreach (XmlNode item in contractualDefinitionsNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["id"].Value;
                     contractualDefinitions_.Add(new ContractualDefinitions(item));
                     IDManager.SetID(contractualDefinitionsIDRef_, contractualDefinitions_[contractualDefinitions_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualDefinitionsIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
                 }
             }
             else
             {
                 contractualDefinitions_.Add(new ContractualDefinitions(item));
             }
         }
     }
     
 
     XmlNodeList contractualTermsSupplementNodeList = xmlNode.SelectNodes("contractualTermsSupplement");
     
     if (contractualTermsSupplementNodeList != null)
     {
         this.contractualTermsSupplement_ = new List<ContractualTermsSupplement>();
         foreach (XmlNode item in contractualTermsSupplementNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["id"].Value;
                     contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                     IDManager.SetID(contractualTermsSupplementIDRef_, contractualTermsSupplement_[contractualTermsSupplement_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualTermsSupplementIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
                 }
             }
             else
             {
                 contractualTermsSupplement_.Add(new ContractualTermsSupplement(item));
             }
         }
     }
     
 
     XmlNode paymentNode = xmlNode.SelectSingleNode("payment");
     
     if (paymentNode != null)
     {
         if (paymentNode.Attributes["href"] != null || paymentNode.Attributes["id"] != null) 
         {
             if (paymentNode.Attributes["id"] != null) 
             {
                 paymentIDRef_ = paymentNode.Attributes["id"].Value;
                 Payment ob = new Payment(paymentNode);
                 IDManager.SetID(paymentIDRef_, ob);
             }
             else if (paymentNode.Attributes["href"] != null)
             {
                 paymentIDRef_ = paymentNode.Attributes["href"].Value;
             }
             else
             {
                 payment_ = new Payment(paymentNode);
             }
         }
         else
         {
             payment_ = new Payment(paymentNode);
         }
     }
     
 
 }
예제 #3
0
        public TradeChangeBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");

            foreach (XmlNode item in tradeIdentifierNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeIdentifierIDRef = item.Attributes["id"].Name;
                        List <PartyTradeIdentifier> ob = new List <PartyTradeIdentifier>();
                        ob.Add(new PartyTradeIdentifier(item));
                        IDManager.SetID(tradeIdentifierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdentifierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeIdentifier.Add(new PartyTradeIdentifier(item));
                    }
                }
            }


            XmlNodeList originalTradeNodeList = xmlNode.SelectNodes("originalTrade");

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

            foreach (XmlNode item in originalTradeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        originalTradeIDRef = item.Attributes["id"].Name;
                        Trade ob = Trade();
                        IDManager.SetID(originalTradeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        originalTradeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        originalTrade = new Trade(item);
                    }
                }
            }


            XmlNodeList agreementDateNodeList = xmlNode.SelectNodes("agreementDate");

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

            foreach (XmlNode item in agreementDateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        agreementDateIDRef = item.Attributes["id"].Name;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(agreementDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        agreementDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        agreementDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");

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

            foreach (XmlNode item in executionDateTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        executionDateTimeIDRef = item.Attributes["id"].Name;
                        ExecutionDateTime ob = ExecutionDateTime();
                        IDManager.SetID(executionDateTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        executionDateTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        executionDateTime = new ExecutionDateTime(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;
                        XsdTypeDate ob = XsdTypeDate();
                        IDManager.SetID(effectiveDateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        effectiveDateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        effectiveDate = new XsdTypeDate(item);
                    }
                }
            }


            XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");

            foreach (XmlNode item in paymentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentIDRef = item.Attributes["id"].Name;
                        List <Payment> ob = new List <Payment>();
                        ob.Add(new Payment(item));
                        IDManager.SetID(paymentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        payment.Add(new Payment(item));
                    }
                }
            }
        }
 public PartyTradeInformation(XmlNode xmlNode)
 {
     XmlNodeList partyReferenceNodeList = xmlNode.SelectNodes("partyReference");
     if (partyReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyReferenceIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(partyReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyReference = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList accountReferenceNodeList = xmlNode.SelectNodes("accountReference");
     if (accountReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountReferenceIDRef = item.Attributes["id"].Name;
                 AccountReference ob = AccountReference();
                 IDManager.SetID(accountReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountReference = new AccountReference(item);
             }
         }
     }
     
 
     XmlNodeList relatedPartyNodeList = xmlNode.SelectNodes("relatedParty");
     
     foreach (XmlNode item in relatedPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relatedPartyIDRef = item.Attributes["id"].Name;
                 List<RelatedParty> ob = new List<RelatedParty>();
                 ob.Add(new RelatedParty(item));
                 IDManager.SetID(relatedPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relatedPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
             relatedParty.Add(new RelatedParty(item));
             }
         }
     }
     
 
     XmlNodeList reportingRoleNodeList = xmlNode.SelectNodes("reportingRole");
     if (reportingRoleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in reportingRoleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 reportingRoleIDRef = item.Attributes["id"].Name;
                 ReportingRole ob = ReportingRole();
                 IDManager.SetID(reportingRoleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 reportingRoleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 reportingRole = new ReportingRole(item);
             }
         }
     }
     
 
     XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");
     
     foreach (XmlNode item in unitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unitIDRef = item.Attributes["id"].Name;
                 List<Unit> ob = new List<Unit>();
                 ob.Add(new Unit(item));
                 IDManager.SetID(unitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unitIDRef = item.Attributes["href"].Name;
             }
             else
             {
             unit.Add(new Unit(item));
             }
         }
     }
     
 
     XmlNodeList relatedBusinessUnitNodeList = xmlNode.SelectNodes("relatedBusinessUnit");
     
     foreach (XmlNode item in relatedBusinessUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relatedBusinessUnitIDRef = item.Attributes["id"].Name;
                 List<RelatedBusinessUnit> ob = new List<RelatedBusinessUnit>();
                 ob.Add(new RelatedBusinessUnit(item));
                 IDManager.SetID(relatedBusinessUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relatedBusinessUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
             relatedBusinessUnit.Add(new RelatedBusinessUnit(item));
             }
         }
     }
     
 
     XmlNodeList relatedPersonNodeList = xmlNode.SelectNodes("relatedPerson");
     
     foreach (XmlNode item in relatedPersonNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 relatedPersonIDRef = item.Attributes["id"].Name;
                 List<RelatedPerson> ob = new List<RelatedPerson>();
                 ob.Add(new RelatedPerson(item));
                 IDManager.SetID(relatedPersonIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 relatedPersonIDRef = item.Attributes["href"].Name;
             }
             else
             {
             relatedPerson.Add(new RelatedPerson(item));
             }
         }
     }
     
 
     XmlNodeList isAccountingHedgeNodeList = xmlNode.SelectNodes("isAccountingHedge");
     if (isAccountingHedgeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in isAccountingHedgeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 isAccountingHedgeIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(isAccountingHedgeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 isAccountingHedgeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 isAccountingHedge = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList categoryNodeList = xmlNode.SelectNodes("category");
     
     foreach (XmlNode item in categoryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 categoryIDRef = item.Attributes["id"].Name;
                 List<TradeCategory> ob = new List<TradeCategory>();
                 ob.Add(new TradeCategory(item));
                 IDManager.SetID(categoryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 categoryIDRef = item.Attributes["href"].Name;
             }
             else
             {
             category.Add(new TradeCategory(item));
             }
         }
     }
     
 
     XmlNodeList traderNodeList = xmlNode.SelectNodes("trader");
     
     foreach (XmlNode item in traderNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 traderIDRef = item.Attributes["id"].Name;
                 List<Trader> ob = new List<Trader>();
                 ob.Add(new Trader(item));
                 IDManager.SetID(traderIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 traderIDRef = item.Attributes["href"].Name;
             }
             else
             {
             trader.Add(new Trader(item));
             }
         }
     }
     
 
     XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");
     if (executionDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef = item.Attributes["id"].Name;
                 ExecutionDateTime ob = ExecutionDateTime();
                 IDManager.SetID(executionDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionDateTime = new ExecutionDateTime(item);
             }
         }
     }
     
 
     XmlNodeList timestampsNodeList = xmlNode.SelectNodes("timestamps");
     if (timestampsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in timestampsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 timestampsIDRef = item.Attributes["id"].Name;
                 TradeProcessingTimestamps ob = TradeProcessingTimestamps();
                 IDManager.SetID(timestampsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 timestampsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 timestamps = new TradeProcessingTimestamps(item);
             }
         }
     }
     
 
     XmlNodeList intentToAllocateNodeList = xmlNode.SelectNodes("intentToAllocate");
     if (intentToAllocateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in intentToAllocateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 intentToAllocateIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(intentToAllocateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 intentToAllocateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 intentToAllocate = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList allocationStatusNodeList = xmlNode.SelectNodes("allocationStatus");
     if (allocationStatusNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in allocationStatusNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 allocationStatusIDRef = item.Attributes["id"].Name;
                 AllocationReportingStatus ob = AllocationReportingStatus();
                 IDManager.SetID(allocationStatusIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 allocationStatusIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 allocationStatus = new AllocationReportingStatus(item);
             }
         }
     }
     
 
     XmlNodeList intentToClearNodeList = xmlNode.SelectNodes("intentToClear");
     if (intentToClearNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in intentToClearNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 intentToClearIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(intentToClearIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 intentToClearIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 intentToClear = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList clearingStatusNodeList = xmlNode.SelectNodes("clearingStatus");
     if (clearingStatusNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in clearingStatusNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 clearingStatusIDRef = item.Attributes["id"].Name;
                 ClearingStatusValue ob = ClearingStatusValue();
                 IDManager.SetID(clearingStatusIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 clearingStatusIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 clearingStatus = new ClearingStatusValue(item);
             }
         }
     }
     
 
     XmlNodeList collateralizationTypeNodeList = xmlNode.SelectNodes("collateralizationType");
     if (collateralizationTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in collateralizationTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 collateralizationTypeIDRef = item.Attributes["id"].Name;
                 CollateralizationType ob = CollateralizationType();
                 IDManager.SetID(collateralizationTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 collateralizationTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 collateralizationType = new CollateralizationType(item);
             }
         }
     }
     
 
     XmlNodeList reportingRegimeNodeList = xmlNode.SelectNodes("reportingRegime");
     
     foreach (XmlNode item in reportingRegimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 reportingRegimeIDRef = item.Attributes["id"].Name;
                 List<ReportingRegime> ob = new List<ReportingRegime>();
                 ob.Add(new ReportingRegime(item));
                 IDManager.SetID(reportingRegimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 reportingRegimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
             reportingRegime.Add(new ReportingRegime(item));
             }
         }
     }
     
 
     XmlNodeList endUserExceptionNodeList = xmlNode.SelectNodes("endUserException");
     if (endUserExceptionNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in endUserExceptionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 endUserExceptionIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(endUserExceptionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 endUserExceptionIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 endUserException = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList endUserExceptionDeclarationNodeList = xmlNode.SelectNodes("endUserExceptionDeclaration");
     if (endUserExceptionDeclarationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in endUserExceptionDeclarationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 endUserExceptionDeclarationIDRef = item.Attributes["id"].Name;
                 EndUserExceptionDeclaration ob = EndUserExceptionDeclaration();
                 IDManager.SetID(endUserExceptionDeclarationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 endUserExceptionDeclarationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 endUserExceptionDeclaration = new EndUserExceptionDeclaration(item);
             }
         }
     }
     
 
     XmlNodeList nonStandardTermsNodeList = xmlNode.SelectNodes("nonStandardTerms");
     if (nonStandardTermsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nonStandardTermsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nonStandardTermsIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(nonStandardTermsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nonStandardTermsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 nonStandardTerms = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList offMarketPriceNodeList = xmlNode.SelectNodes("offMarketPrice");
     if (offMarketPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in offMarketPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 offMarketPriceIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(offMarketPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 offMarketPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 offMarketPrice = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList largeSizeTradeNodeList = xmlNode.SelectNodes("largeSizeTrade");
     if (largeSizeTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in largeSizeTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 largeSizeTradeIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(largeSizeTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 largeSizeTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 largeSizeTrade = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList executionTypeNodeList = xmlNode.SelectNodes("executionType");
     if (executionTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionTypeIDRef = item.Attributes["id"].Name;
                 ExecutionType ob = ExecutionType();
                 IDManager.SetID(executionTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionType = new ExecutionType(item);
             }
         }
     }
     
 
     XmlNodeList executionVenueTypeNodeList = xmlNode.SelectNodes("executionVenueType");
     if (executionVenueTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionVenueTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionVenueTypeIDRef = item.Attributes["id"].Name;
                 ExecutionVenueType ob = ExecutionVenueType();
                 IDManager.SetID(executionVenueTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionVenueTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionVenueType = new ExecutionVenueType(item);
             }
         }
     }
     
 
     XmlNodeList verificationMethodNodeList = xmlNode.SelectNodes("verificationMethod");
     if (verificationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in verificationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 verificationMethodIDRef = item.Attributes["id"].Name;
                 VerificationMethod ob = VerificationMethod();
                 IDManager.SetID(verificationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 verificationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 verificationMethod = new VerificationMethod(item);
             }
         }
     }
     
 
     XmlNodeList confirmationMethodNodeList = xmlNode.SelectNodes("confirmationMethod");
     if (confirmationMethodNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in confirmationMethodNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 confirmationMethodIDRef = item.Attributes["id"].Name;
                 ConfirmationMethod ob = ConfirmationMethod();
                 IDManager.SetID(confirmationMethodIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 confirmationMethodIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 confirmationMethod = new ConfirmationMethod(item);
             }
         }
     }
     
 
 }
예제 #5
0
        public TradeChangeBase(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");

            if (tradeIdentifierNodeList != null)
            {
                this.tradeIdentifier_ = new List <PartyTradeIdentifier>();
                foreach (XmlNode item in tradeIdentifierNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            tradeIdentifierIDRef_ = item.Attributes["id"].Value;
                            tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                            IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            tradeIdentifierIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                        }
                    }
                    else
                    {
                        tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                    }
                }
            }


            XmlNode originalTradeNode = xmlNode.SelectSingleNode("originalTrade");

            if (originalTradeNode != null)
            {
                if (originalTradeNode.Attributes["href"] != null || originalTradeNode.Attributes["id"] != null)
                {
                    if (originalTradeNode.Attributes["id"] != null)
                    {
                        originalTradeIDRef_ = originalTradeNode.Attributes["id"].Value;
                        Trade ob = new Trade(originalTradeNode);
                        IDManager.SetID(originalTradeIDRef_, ob);
                    }
                    else if (originalTradeNode.Attributes["href"] != null)
                    {
                        originalTradeIDRef_ = originalTradeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        originalTrade_ = new Trade(originalTradeNode);
                    }
                }
                else
                {
                    originalTrade_ = new Trade(originalTradeNode);
                }
            }


            XmlNode agreementDateNode = xmlNode.SelectSingleNode("agreementDate");

            if (agreementDateNode != null)
            {
                if (agreementDateNode.Attributes["href"] != null || agreementDateNode.Attributes["id"] != null)
                {
                    if (agreementDateNode.Attributes["id"] != null)
                    {
                        agreementDateIDRef_ = agreementDateNode.Attributes["id"].Value;
                        XsdTypeDate ob = new XsdTypeDate(agreementDateNode);
                        IDManager.SetID(agreementDateIDRef_, ob);
                    }
                    else if (agreementDateNode.Attributes["href"] != null)
                    {
                        agreementDateIDRef_ = agreementDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        agreementDate_ = new XsdTypeDate(agreementDateNode);
                    }
                }
                else
                {
                    agreementDate_ = new XsdTypeDate(agreementDateNode);
                }
            }


            XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");

            if (executionDateTimeNode != null)
            {
                if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null)
                {
                    if (executionDateTimeNode.Attributes["id"] != null)
                    {
                        executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                        ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                        IDManager.SetID(executionDateTimeIDRef_, ob);
                    }
                    else if (executionDateTimeNode.Attributes["href"] != null)
                    {
                        executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
                    }
                }
                else
                {
                    executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
                }
            }


            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;
                        XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                        IDManager.SetID(effectiveDateIDRef_, ob);
                    }
                    else if (effectiveDateNode.Attributes["href"] != null)
                    {
                        effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
                    }
                    else
                    {
                        effectiveDate_ = new XsdTypeDate(effectiveDateNode);
                    }
                }
                else
                {
                    effectiveDate_ = new XsdTypeDate(effectiveDateNode);
                }
            }


            XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");

            if (paymentNodeList != null)
            {
                this.payment_ = new List <Payment>();
                foreach (XmlNode item in paymentNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            paymentIDRef_ = item.Attributes["id"].Value;
                            payment_.Add(new Payment(item));
                            IDManager.SetID(paymentIDRef_, payment_[payment_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            paymentIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            payment_.Add(new Payment(item));
                        }
                    }
                    else
                    {
                        payment_.Add(new Payment(item));
                    }
                }
            }
        }
 public TradeChangeBase(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");
     
     if (tradeIdentifierNodeList != null)
     {
         this.tradeIdentifier_ = new List<PartyTradeIdentifier>();
         foreach (XmlNode item in tradeIdentifierNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     tradeIdentifierIDRef_ = item.Attributes["id"].Value;
                     tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                     IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     tradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 tradeIdentifier_.Add(new PartyTradeIdentifier(item));
                 }
             }
             else
             {
                 tradeIdentifier_.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode originalTradeNode = xmlNode.SelectSingleNode("originalTrade");
     
     if (originalTradeNode != null)
     {
         if (originalTradeNode.Attributes["href"] != null || originalTradeNode.Attributes["id"] != null) 
         {
             if (originalTradeNode.Attributes["id"] != null) 
             {
                 originalTradeIDRef_ = originalTradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(originalTradeNode);
                 IDManager.SetID(originalTradeIDRef_, ob);
             }
             else if (originalTradeNode.Attributes["href"] != null)
             {
                 originalTradeIDRef_ = originalTradeNode.Attributes["href"].Value;
             }
             else
             {
                 originalTrade_ = new Trade(originalTradeNode);
             }
         }
         else
         {
             originalTrade_ = new Trade(originalTradeNode);
         }
     }
     
 
     XmlNode agreementDateNode = xmlNode.SelectSingleNode("agreementDate");
     
     if (agreementDateNode != null)
     {
         if (agreementDateNode.Attributes["href"] != null || agreementDateNode.Attributes["id"] != null) 
         {
             if (agreementDateNode.Attributes["id"] != null) 
             {
                 agreementDateIDRef_ = agreementDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(agreementDateNode);
                 IDManager.SetID(agreementDateIDRef_, ob);
             }
             else if (agreementDateNode.Attributes["href"] != null)
             {
                 agreementDateIDRef_ = agreementDateNode.Attributes["href"].Value;
             }
             else
             {
                 agreementDate_ = new XsdTypeDate(agreementDateNode);
             }
         }
         else
         {
             agreementDate_ = new XsdTypeDate(agreementDateNode);
         }
     }
     
 
     XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");
     
     if (executionDateTimeNode != null)
     {
         if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null) 
         {
             if (executionDateTimeNode.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                 ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                 IDManager.SetID(executionDateTimeIDRef_, ob);
             }
             else if (executionDateTimeNode.Attributes["href"] != null)
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
             }
         }
         else
         {
             executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
         }
     }
     
 
     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;
                 XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new XsdTypeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new XsdTypeDate(effectiveDateNode);
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     
     if (paymentNodeList != null)
     {
         this.payment_ = new List<Payment>();
         foreach (XmlNode item in paymentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     paymentIDRef_ = item.Attributes["id"].Value;
                     payment_.Add(new Payment(item));
                     IDManager.SetID(paymentIDRef_, payment_[payment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     paymentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 payment_.Add(new Payment(item));
                 }
             }
             else
             {
                 payment_.Add(new Payment(item));
             }
         }
     }
     
 
 }
 public TradeChangeBase(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");
     
     foreach (XmlNode item in tradeIdentifierNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIdentifierIDRef = item.Attributes["id"].Name;
                 List<PartyTradeIdentifier> ob = new List<PartyTradeIdentifier>();
                 ob.Add(new PartyTradeIdentifier(item));
                 IDManager.SetID(tradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             tradeIdentifier.Add(new PartyTradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList originalTradeNodeList = xmlNode.SelectNodes("originalTrade");
     if (originalTradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in originalTradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 originalTradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(originalTradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 originalTradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 originalTrade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList agreementDateNodeList = xmlNode.SelectNodes("agreementDate");
     if (agreementDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in agreementDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 agreementDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(agreementDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 agreementDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 agreementDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList executionDateTimeNodeList = xmlNode.SelectNodes("executionDateTime");
     if (executionDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in executionDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef = item.Attributes["id"].Name;
                 ExecutionDateTime ob = ExecutionDateTime();
                 IDManager.SetID(executionDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 executionDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 executionDateTime = new ExecutionDateTime(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;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList paymentNodeList = xmlNode.SelectNodes("payment");
     
     foreach (XmlNode item in paymentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentIDRef = item.Attributes["id"].Name;
                 List<Payment> ob = new List<Payment>();
                 ob.Add(new Payment(item));
                 IDManager.SetID(paymentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentIDRef = item.Attributes["href"].Name;
             }
             else
             {
             payment.Add(new Payment(item));
             }
         }
     }
     
 
 }
 public PartyTradeInformation(XmlNode xmlNode)
 {
     XmlNode partyReferenceNode = xmlNode.SelectSingleNode("partyReference");
     
     if (partyReferenceNode != null)
     {
         if (partyReferenceNode.Attributes["href"] != null || partyReferenceNode.Attributes["id"] != null) 
         {
             if (partyReferenceNode.Attributes["id"] != null) 
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(partyReferenceNode);
                 IDManager.SetID(partyReferenceIDRef_, ob);
             }
             else if (partyReferenceNode.Attributes["href"] != null)
             {
                 partyReferenceIDRef_ = partyReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 partyReference_ = new PartyReference(partyReferenceNode);
             }
         }
         else
         {
             partyReference_ = new PartyReference(partyReferenceNode);
         }
     }
     
 
     XmlNode accountReferenceNode = xmlNode.SelectSingleNode("accountReference");
     
     if (accountReferenceNode != null)
     {
         if (accountReferenceNode.Attributes["href"] != null || accountReferenceNode.Attributes["id"] != null) 
         {
             if (accountReferenceNode.Attributes["id"] != null) 
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["id"].Value;
                 AccountReference ob = new AccountReference(accountReferenceNode);
                 IDManager.SetID(accountReferenceIDRef_, ob);
             }
             else if (accountReferenceNode.Attributes["href"] != null)
             {
                 accountReferenceIDRef_ = accountReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 accountReference_ = new AccountReference(accountReferenceNode);
             }
         }
         else
         {
             accountReference_ = new AccountReference(accountReferenceNode);
         }
     }
     
 
     XmlNodeList relatedPartyNodeList = xmlNode.SelectNodes("relatedParty");
     
     if (relatedPartyNodeList != null)
     {
         this.relatedParty_ = new List<RelatedParty>();
         foreach (XmlNode item in relatedPartyNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     relatedPartyIDRef_ = item.Attributes["id"].Value;
                     relatedParty_.Add(new RelatedParty(item));
                     IDManager.SetID(relatedPartyIDRef_, relatedParty_[relatedParty_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     relatedPartyIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 relatedParty_.Add(new RelatedParty(item));
                 }
             }
             else
             {
                 relatedParty_.Add(new RelatedParty(item));
             }
         }
     }
     
 
     XmlNode reportingRoleNode = xmlNode.SelectSingleNode("reportingRole");
     
     if (reportingRoleNode != null)
     {
         if (reportingRoleNode.Attributes["href"] != null || reportingRoleNode.Attributes["id"] != null) 
         {
             if (reportingRoleNode.Attributes["id"] != null) 
             {
                 reportingRoleIDRef_ = reportingRoleNode.Attributes["id"].Value;
                 ReportingRole ob = new ReportingRole(reportingRoleNode);
                 IDManager.SetID(reportingRoleIDRef_, ob);
             }
             else if (reportingRoleNode.Attributes["href"] != null)
             {
                 reportingRoleIDRef_ = reportingRoleNode.Attributes["href"].Value;
             }
             else
             {
                 reportingRole_ = new ReportingRole(reportingRoleNode);
             }
         }
         else
         {
             reportingRole_ = new ReportingRole(reportingRoleNode);
         }
     }
     
 
     XmlNodeList unitNodeList = xmlNode.SelectNodes("unit");
     
     if (unitNodeList != null)
     {
         this.unit_ = new List<Unit>();
         foreach (XmlNode item in unitNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     unitIDRef_ = item.Attributes["id"].Value;
                     unit_.Add(new Unit(item));
                     IDManager.SetID(unitIDRef_, unit_[unit_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     unitIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 unit_.Add(new Unit(item));
                 }
             }
             else
             {
                 unit_.Add(new Unit(item));
             }
         }
     }
     
 
     XmlNodeList relatedBusinessUnitNodeList = xmlNode.SelectNodes("relatedBusinessUnit");
     
     if (relatedBusinessUnitNodeList != null)
     {
         this.relatedBusinessUnit_ = new List<RelatedBusinessUnit>();
         foreach (XmlNode item in relatedBusinessUnitNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     relatedBusinessUnitIDRef_ = item.Attributes["id"].Value;
                     relatedBusinessUnit_.Add(new RelatedBusinessUnit(item));
                     IDManager.SetID(relatedBusinessUnitIDRef_, relatedBusinessUnit_[relatedBusinessUnit_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     relatedBusinessUnitIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 relatedBusinessUnit_.Add(new RelatedBusinessUnit(item));
                 }
             }
             else
             {
                 relatedBusinessUnit_.Add(new RelatedBusinessUnit(item));
             }
         }
     }
     
 
     XmlNodeList relatedPersonNodeList = xmlNode.SelectNodes("relatedPerson");
     
     if (relatedPersonNodeList != null)
     {
         this.relatedPerson_ = new List<RelatedPerson>();
         foreach (XmlNode item in relatedPersonNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     relatedPersonIDRef_ = item.Attributes["id"].Value;
                     relatedPerson_.Add(new RelatedPerson(item));
                     IDManager.SetID(relatedPersonIDRef_, relatedPerson_[relatedPerson_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     relatedPersonIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 relatedPerson_.Add(new RelatedPerson(item));
                 }
             }
             else
             {
                 relatedPerson_.Add(new RelatedPerson(item));
             }
         }
     }
     
 
     XmlNode isAccountingHedgeNode = xmlNode.SelectSingleNode("isAccountingHedge");
     
     if (isAccountingHedgeNode != null)
     {
         if (isAccountingHedgeNode.Attributes["href"] != null || isAccountingHedgeNode.Attributes["id"] != null) 
         {
             if (isAccountingHedgeNode.Attributes["id"] != null) 
             {
                 isAccountingHedgeIDRef_ = isAccountingHedgeNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(isAccountingHedgeNode);
                 IDManager.SetID(isAccountingHedgeIDRef_, ob);
             }
             else if (isAccountingHedgeNode.Attributes["href"] != null)
             {
                 isAccountingHedgeIDRef_ = isAccountingHedgeNode.Attributes["href"].Value;
             }
             else
             {
                 isAccountingHedge_ = new XsdTypeBoolean(isAccountingHedgeNode);
             }
         }
         else
         {
             isAccountingHedge_ = new XsdTypeBoolean(isAccountingHedgeNode);
         }
     }
     
 
     XmlNodeList categoryNodeList = xmlNode.SelectNodes("category");
     
     if (categoryNodeList != null)
     {
         this.category_ = new List<TradeCategory>();
         foreach (XmlNode item in categoryNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     categoryIDRef_ = item.Attributes["id"].Value;
                     category_.Add(new TradeCategory(item));
                     IDManager.SetID(categoryIDRef_, category_[category_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     categoryIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 category_.Add(new TradeCategory(item));
                 }
             }
             else
             {
                 category_.Add(new TradeCategory(item));
             }
         }
     }
     
 
     XmlNodeList traderNodeList = xmlNode.SelectNodes("trader");
     
     if (traderNodeList != null)
     {
         this.trader_ = new List<Trader>();
         foreach (XmlNode item in traderNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     traderIDRef_ = item.Attributes["id"].Value;
                     trader_.Add(new Trader(item));
                     IDManager.SetID(traderIDRef_, trader_[trader_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     traderIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 trader_.Add(new Trader(item));
                 }
             }
             else
             {
                 trader_.Add(new Trader(item));
             }
         }
     }
     
 
     XmlNode executionDateTimeNode = xmlNode.SelectSingleNode("executionDateTime");
     
     if (executionDateTimeNode != null)
     {
         if (executionDateTimeNode.Attributes["href"] != null || executionDateTimeNode.Attributes["id"] != null) 
         {
             if (executionDateTimeNode.Attributes["id"] != null) 
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["id"].Value;
                 ExecutionDateTime ob = new ExecutionDateTime(executionDateTimeNode);
                 IDManager.SetID(executionDateTimeIDRef_, ob);
             }
             else if (executionDateTimeNode.Attributes["href"] != null)
             {
                 executionDateTimeIDRef_ = executionDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
             }
         }
         else
         {
             executionDateTime_ = new ExecutionDateTime(executionDateTimeNode);
         }
     }
     
 
     XmlNode timestampsNode = xmlNode.SelectSingleNode("timestamps");
     
     if (timestampsNode != null)
     {
         if (timestampsNode.Attributes["href"] != null || timestampsNode.Attributes["id"] != null) 
         {
             if (timestampsNode.Attributes["id"] != null) 
             {
                 timestampsIDRef_ = timestampsNode.Attributes["id"].Value;
                 TradeProcessingTimestamps ob = new TradeProcessingTimestamps(timestampsNode);
                 IDManager.SetID(timestampsIDRef_, ob);
             }
             else if (timestampsNode.Attributes["href"] != null)
             {
                 timestampsIDRef_ = timestampsNode.Attributes["href"].Value;
             }
             else
             {
                 timestamps_ = new TradeProcessingTimestamps(timestampsNode);
             }
         }
         else
         {
             timestamps_ = new TradeProcessingTimestamps(timestampsNode);
         }
     }
     
 
     XmlNode intentToAllocateNode = xmlNode.SelectSingleNode("intentToAllocate");
     
     if (intentToAllocateNode != null)
     {
         if (intentToAllocateNode.Attributes["href"] != null || intentToAllocateNode.Attributes["id"] != null) 
         {
             if (intentToAllocateNode.Attributes["id"] != null) 
             {
                 intentToAllocateIDRef_ = intentToAllocateNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(intentToAllocateNode);
                 IDManager.SetID(intentToAllocateIDRef_, ob);
             }
             else if (intentToAllocateNode.Attributes["href"] != null)
             {
                 intentToAllocateIDRef_ = intentToAllocateNode.Attributes["href"].Value;
             }
             else
             {
                 intentToAllocate_ = new XsdTypeBoolean(intentToAllocateNode);
             }
         }
         else
         {
             intentToAllocate_ = new XsdTypeBoolean(intentToAllocateNode);
         }
     }
     
 
     XmlNode allocationStatusNode = xmlNode.SelectSingleNode("allocationStatus");
     
     if (allocationStatusNode != null)
     {
         if (allocationStatusNode.Attributes["href"] != null || allocationStatusNode.Attributes["id"] != null) 
         {
             if (allocationStatusNode.Attributes["id"] != null) 
             {
                 allocationStatusIDRef_ = allocationStatusNode.Attributes["id"].Value;
                 AllocationReportingStatus ob = new AllocationReportingStatus(allocationStatusNode);
                 IDManager.SetID(allocationStatusIDRef_, ob);
             }
             else if (allocationStatusNode.Attributes["href"] != null)
             {
                 allocationStatusIDRef_ = allocationStatusNode.Attributes["href"].Value;
             }
             else
             {
                 allocationStatus_ = new AllocationReportingStatus(allocationStatusNode);
             }
         }
         else
         {
             allocationStatus_ = new AllocationReportingStatus(allocationStatusNode);
         }
     }
     
 
     XmlNode intentToClearNode = xmlNode.SelectSingleNode("intentToClear");
     
     if (intentToClearNode != null)
     {
         if (intentToClearNode.Attributes["href"] != null || intentToClearNode.Attributes["id"] != null) 
         {
             if (intentToClearNode.Attributes["id"] != null) 
             {
                 intentToClearIDRef_ = intentToClearNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(intentToClearNode);
                 IDManager.SetID(intentToClearIDRef_, ob);
             }
             else if (intentToClearNode.Attributes["href"] != null)
             {
                 intentToClearIDRef_ = intentToClearNode.Attributes["href"].Value;
             }
             else
             {
                 intentToClear_ = new XsdTypeBoolean(intentToClearNode);
             }
         }
         else
         {
             intentToClear_ = new XsdTypeBoolean(intentToClearNode);
         }
     }
     
 
     XmlNode clearingStatusNode = xmlNode.SelectSingleNode("clearingStatus");
     
     if (clearingStatusNode != null)
     {
         if (clearingStatusNode.Attributes["href"] != null || clearingStatusNode.Attributes["id"] != null) 
         {
             if (clearingStatusNode.Attributes["id"] != null) 
             {
                 clearingStatusIDRef_ = clearingStatusNode.Attributes["id"].Value;
                 ClearingStatusValue ob = new ClearingStatusValue(clearingStatusNode);
                 IDManager.SetID(clearingStatusIDRef_, ob);
             }
             else if (clearingStatusNode.Attributes["href"] != null)
             {
                 clearingStatusIDRef_ = clearingStatusNode.Attributes["href"].Value;
             }
             else
             {
                 clearingStatus_ = new ClearingStatusValue(clearingStatusNode);
             }
         }
         else
         {
             clearingStatus_ = new ClearingStatusValue(clearingStatusNode);
         }
     }
     
 
     XmlNode collateralizationTypeNode = xmlNode.SelectSingleNode("collateralizationType");
     
     if (collateralizationTypeNode != null)
     {
         if (collateralizationTypeNode.Attributes["href"] != null || collateralizationTypeNode.Attributes["id"] != null) 
         {
             if (collateralizationTypeNode.Attributes["id"] != null) 
             {
                 collateralizationTypeIDRef_ = collateralizationTypeNode.Attributes["id"].Value;
                 CollateralizationType ob = new CollateralizationType(collateralizationTypeNode);
                 IDManager.SetID(collateralizationTypeIDRef_, ob);
             }
             else if (collateralizationTypeNode.Attributes["href"] != null)
             {
                 collateralizationTypeIDRef_ = collateralizationTypeNode.Attributes["href"].Value;
             }
             else
             {
                 collateralizationType_ = new CollateralizationType(collateralizationTypeNode);
             }
         }
         else
         {
             collateralizationType_ = new CollateralizationType(collateralizationTypeNode);
         }
     }
     
 
     XmlNodeList reportingRegimeNodeList = xmlNode.SelectNodes("reportingRegime");
     
     if (reportingRegimeNodeList != null)
     {
         this.reportingRegime_ = new List<ReportingRegime>();
         foreach (XmlNode item in reportingRegimeNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     reportingRegimeIDRef_ = item.Attributes["id"].Value;
                     reportingRegime_.Add(new ReportingRegime(item));
                     IDManager.SetID(reportingRegimeIDRef_, reportingRegime_[reportingRegime_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     reportingRegimeIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 reportingRegime_.Add(new ReportingRegime(item));
                 }
             }
             else
             {
                 reportingRegime_.Add(new ReportingRegime(item));
             }
         }
     }
     
 
     XmlNode endUserExceptionNode = xmlNode.SelectSingleNode("endUserException");
     
     if (endUserExceptionNode != null)
     {
         if (endUserExceptionNode.Attributes["href"] != null || endUserExceptionNode.Attributes["id"] != null) 
         {
             if (endUserExceptionNode.Attributes["id"] != null) 
             {
                 endUserExceptionIDRef_ = endUserExceptionNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(endUserExceptionNode);
                 IDManager.SetID(endUserExceptionIDRef_, ob);
             }
             else if (endUserExceptionNode.Attributes["href"] != null)
             {
                 endUserExceptionIDRef_ = endUserExceptionNode.Attributes["href"].Value;
             }
             else
             {
                 endUserException_ = new XsdTypeBoolean(endUserExceptionNode);
             }
         }
         else
         {
             endUserException_ = new XsdTypeBoolean(endUserExceptionNode);
         }
     }
     
 
     XmlNode endUserExceptionDeclarationNode = xmlNode.SelectSingleNode("endUserExceptionDeclaration");
     
     if (endUserExceptionDeclarationNode != null)
     {
         if (endUserExceptionDeclarationNode.Attributes["href"] != null || endUserExceptionDeclarationNode.Attributes["id"] != null) 
         {
             if (endUserExceptionDeclarationNode.Attributes["id"] != null) 
             {
                 endUserExceptionDeclarationIDRef_ = endUserExceptionDeclarationNode.Attributes["id"].Value;
                 EndUserExceptionDeclaration ob = new EndUserExceptionDeclaration(endUserExceptionDeclarationNode);
                 IDManager.SetID(endUserExceptionDeclarationIDRef_, ob);
             }
             else if (endUserExceptionDeclarationNode.Attributes["href"] != null)
             {
                 endUserExceptionDeclarationIDRef_ = endUserExceptionDeclarationNode.Attributes["href"].Value;
             }
             else
             {
                 endUserExceptionDeclaration_ = new EndUserExceptionDeclaration(endUserExceptionDeclarationNode);
             }
         }
         else
         {
             endUserExceptionDeclaration_ = new EndUserExceptionDeclaration(endUserExceptionDeclarationNode);
         }
     }
     
 
     XmlNode nonStandardTermsNode = xmlNode.SelectSingleNode("nonStandardTerms");
     
     if (nonStandardTermsNode != null)
     {
         if (nonStandardTermsNode.Attributes["href"] != null || nonStandardTermsNode.Attributes["id"] != null) 
         {
             if (nonStandardTermsNode.Attributes["id"] != null) 
             {
                 nonStandardTermsIDRef_ = nonStandardTermsNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(nonStandardTermsNode);
                 IDManager.SetID(nonStandardTermsIDRef_, ob);
             }
             else if (nonStandardTermsNode.Attributes["href"] != null)
             {
                 nonStandardTermsIDRef_ = nonStandardTermsNode.Attributes["href"].Value;
             }
             else
             {
                 nonStandardTerms_ = new XsdTypeBoolean(nonStandardTermsNode);
             }
         }
         else
         {
             nonStandardTerms_ = new XsdTypeBoolean(nonStandardTermsNode);
         }
     }
     
 
     XmlNode offMarketPriceNode = xmlNode.SelectSingleNode("offMarketPrice");
     
     if (offMarketPriceNode != null)
     {
         if (offMarketPriceNode.Attributes["href"] != null || offMarketPriceNode.Attributes["id"] != null) 
         {
             if (offMarketPriceNode.Attributes["id"] != null) 
             {
                 offMarketPriceIDRef_ = offMarketPriceNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(offMarketPriceNode);
                 IDManager.SetID(offMarketPriceIDRef_, ob);
             }
             else if (offMarketPriceNode.Attributes["href"] != null)
             {
                 offMarketPriceIDRef_ = offMarketPriceNode.Attributes["href"].Value;
             }
             else
             {
                 offMarketPrice_ = new XsdTypeBoolean(offMarketPriceNode);
             }
         }
         else
         {
             offMarketPrice_ = new XsdTypeBoolean(offMarketPriceNode);
         }
     }
     
 
     XmlNode largeSizeTradeNode = xmlNode.SelectSingleNode("largeSizeTrade");
     
     if (largeSizeTradeNode != null)
     {
         if (largeSizeTradeNode.Attributes["href"] != null || largeSizeTradeNode.Attributes["id"] != null) 
         {
             if (largeSizeTradeNode.Attributes["id"] != null) 
             {
                 largeSizeTradeIDRef_ = largeSizeTradeNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(largeSizeTradeNode);
                 IDManager.SetID(largeSizeTradeIDRef_, ob);
             }
             else if (largeSizeTradeNode.Attributes["href"] != null)
             {
                 largeSizeTradeIDRef_ = largeSizeTradeNode.Attributes["href"].Value;
             }
             else
             {
                 largeSizeTrade_ = new XsdTypeBoolean(largeSizeTradeNode);
             }
         }
         else
         {
             largeSizeTrade_ = new XsdTypeBoolean(largeSizeTradeNode);
         }
     }
     
 
     XmlNode executionTypeNode = xmlNode.SelectSingleNode("executionType");
     
     if (executionTypeNode != null)
     {
         if (executionTypeNode.Attributes["href"] != null || executionTypeNode.Attributes["id"] != null) 
         {
             if (executionTypeNode.Attributes["id"] != null) 
             {
                 executionTypeIDRef_ = executionTypeNode.Attributes["id"].Value;
                 ExecutionType ob = new ExecutionType(executionTypeNode);
                 IDManager.SetID(executionTypeIDRef_, ob);
             }
             else if (executionTypeNode.Attributes["href"] != null)
             {
                 executionTypeIDRef_ = executionTypeNode.Attributes["href"].Value;
             }
             else
             {
                 executionType_ = new ExecutionType(executionTypeNode);
             }
         }
         else
         {
             executionType_ = new ExecutionType(executionTypeNode);
         }
     }
     
 
     XmlNode executionVenueTypeNode = xmlNode.SelectSingleNode("executionVenueType");
     
     if (executionVenueTypeNode != null)
     {
         if (executionVenueTypeNode.Attributes["href"] != null || executionVenueTypeNode.Attributes["id"] != null) 
         {
             if (executionVenueTypeNode.Attributes["id"] != null) 
             {
                 executionVenueTypeIDRef_ = executionVenueTypeNode.Attributes["id"].Value;
                 ExecutionVenueType ob = new ExecutionVenueType(executionVenueTypeNode);
                 IDManager.SetID(executionVenueTypeIDRef_, ob);
             }
             else if (executionVenueTypeNode.Attributes["href"] != null)
             {
                 executionVenueTypeIDRef_ = executionVenueTypeNode.Attributes["href"].Value;
             }
             else
             {
                 executionVenueType_ = new ExecutionVenueType(executionVenueTypeNode);
             }
         }
         else
         {
             executionVenueType_ = new ExecutionVenueType(executionVenueTypeNode);
         }
     }
     
 
     XmlNode verificationMethodNode = xmlNode.SelectSingleNode("verificationMethod");
     
     if (verificationMethodNode != null)
     {
         if (verificationMethodNode.Attributes["href"] != null || verificationMethodNode.Attributes["id"] != null) 
         {
             if (verificationMethodNode.Attributes["id"] != null) 
             {
                 verificationMethodIDRef_ = verificationMethodNode.Attributes["id"].Value;
                 VerificationMethod ob = new VerificationMethod(verificationMethodNode);
                 IDManager.SetID(verificationMethodIDRef_, ob);
             }
             else if (verificationMethodNode.Attributes["href"] != null)
             {
                 verificationMethodIDRef_ = verificationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 verificationMethod_ = new VerificationMethod(verificationMethodNode);
             }
         }
         else
         {
             verificationMethod_ = new VerificationMethod(verificationMethodNode);
         }
     }
     
 
     XmlNode confirmationMethodNode = xmlNode.SelectSingleNode("confirmationMethod");
     
     if (confirmationMethodNode != null)
     {
         if (confirmationMethodNode.Attributes["href"] != null || confirmationMethodNode.Attributes["id"] != null) 
         {
             if (confirmationMethodNode.Attributes["id"] != null) 
             {
                 confirmationMethodIDRef_ = confirmationMethodNode.Attributes["id"].Value;
                 ConfirmationMethod ob = new ConfirmationMethod(confirmationMethodNode);
                 IDManager.SetID(confirmationMethodIDRef_, ob);
             }
             else if (confirmationMethodNode.Attributes["href"] != null)
             {
                 confirmationMethodIDRef_ = confirmationMethodNode.Attributes["href"].Value;
             }
             else
             {
                 confirmationMethod_ = new ConfirmationMethod(confirmationMethodNode);
             }
         }
         else
         {
             confirmationMethod_ = new ConfirmationMethod(confirmationMethodNode);
         }
     }
     
 
 }