public ClearingStatusItem(XmlNode xmlNode)
        {
            XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");

            if (tradeIdentifierNodeList != null)
            {
                this.tradeIdentifier_ = new List <TradeIdentifier>();
                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 TradeIdentifier(item));
                            IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            tradeIdentifierIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            tradeIdentifier_.Add(new TradeIdentifier(item));
                        }
                    }
                    else
                    {
                        tradeIdentifier_.Add(new TradeIdentifier(item));
                    }
                }
            }


            XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation");

            if (tradeReferenceInformationNode != null)
            {
                if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null)
                {
                    if (tradeReferenceInformationNode.Attributes["id"] != null)
                    {
                        tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value;
                        TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode);
                        IDManager.SetID(tradeReferenceInformationIDRef_, ob);
                    }
                    else if (tradeReferenceInformationNode.Attributes["href"] != null)
                    {
                        tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode);
                    }
                }
                else
                {
                    tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode);
                }
            }


            XmlNode tradeNode = xmlNode.SelectSingleNode("trade");

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


            XmlNode clearingStatusValueNode = xmlNode.SelectSingleNode("clearingStatusValue");

            if (clearingStatusValueNode != null)
            {
                if (clearingStatusValueNode.Attributes["href"] != null || clearingStatusValueNode.Attributes["id"] != null)
                {
                    if (clearingStatusValueNode.Attributes["id"] != null)
                    {
                        clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["id"].Value;
                        ClearingStatusValue ob = new ClearingStatusValue(clearingStatusValueNode);
                        IDManager.SetID(clearingStatusValueIDRef_, ob);
                    }
                    else if (clearingStatusValueNode.Attributes["href"] != null)
                    {
                        clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["href"].Value;
                    }
                    else
                    {
                        clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode);
                    }
                }
                else
                {
                    clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode);
                }
            }


            XmlNode updatedDateTimeNode = xmlNode.SelectSingleNode("updatedDateTime");

            if (updatedDateTimeNode != null)
            {
                if (updatedDateTimeNode.Attributes["href"] != null || updatedDateTimeNode.Attributes["id"] != null)
                {
                    if (updatedDateTimeNode.Attributes["id"] != null)
                    {
                        updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["id"].Value;
                        XsdTypeDateTime ob = new XsdTypeDateTime(updatedDateTimeNode);
                        IDManager.SetID(updatedDateTimeIDRef_, ob);
                    }
                    else if (updatedDateTimeNode.Attributes["href"] != null)
                    {
                        updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode);
                    }
                }
                else
                {
                    updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode);
                }
            }


            XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");

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


            XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo");

            if (statusAppliesToNodeList != null)
            {
                this.statusAppliesTo_ = new List <PartyReference>();
                foreach (XmlNode item in statusAppliesToNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            statusAppliesToIDRef_ = item.Attributes["id"].Value;
                            statusAppliesTo_.Add(new PartyReference(item));
                            IDManager.SetID(statusAppliesToIDRef_, statusAppliesTo_[statusAppliesTo_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            statusAppliesToIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            statusAppliesTo_.Add(new PartyReference(item));
                        }
                    }
                    else
                    {
                        statusAppliesTo_.Add(new PartyReference(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);
             }
         }
     }
     
 
 }
 public ClearingStatusItem(XmlNode xmlNode)
 {
     XmlNodeList tradeIdentifierNodeList = xmlNode.SelectNodes("tradeIdentifier");
     
     if (tradeIdentifierNodeList != null)
     {
         this.tradeIdentifier_ = new List<TradeIdentifier>();
         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 TradeIdentifier(item));
                     IDManager.SetID(tradeIdentifierIDRef_, tradeIdentifier_[tradeIdentifier_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     tradeIdentifierIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 tradeIdentifier_.Add(new TradeIdentifier(item));
                 }
             }
             else
             {
                 tradeIdentifier_.Add(new TradeIdentifier(item));
             }
         }
     }
     
 
     XmlNode tradeReferenceInformationNode = xmlNode.SelectSingleNode("tradeReferenceInformation");
     
     if (tradeReferenceInformationNode != null)
     {
         if (tradeReferenceInformationNode.Attributes["href"] != null || tradeReferenceInformationNode.Attributes["id"] != null) 
         {
             if (tradeReferenceInformationNode.Attributes["id"] != null) 
             {
                 tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["id"].Value;
                 TradeReferenceInformation ob = new TradeReferenceInformation(tradeReferenceInformationNode);
                 IDManager.SetID(tradeReferenceInformationIDRef_, ob);
             }
             else if (tradeReferenceInformationNode.Attributes["href"] != null)
             {
                 tradeReferenceInformationIDRef_ = tradeReferenceInformationNode.Attributes["href"].Value;
             }
             else
             {
                 tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode);
             }
         }
         else
         {
             tradeReferenceInformation_ = new TradeReferenceInformation(tradeReferenceInformationNode);
         }
     }
     
 
     XmlNode tradeNode = xmlNode.SelectSingleNode("trade");
     
     if (tradeNode != null)
     {
         if (tradeNode.Attributes["href"] != null || tradeNode.Attributes["id"] != null) 
         {
             if (tradeNode.Attributes["id"] != null) 
             {
                 tradeIDRef_ = tradeNode.Attributes["id"].Value;
                 Trade ob = new Trade(tradeNode);
                 IDManager.SetID(tradeIDRef_, ob);
             }
             else if (tradeNode.Attributes["href"] != null)
             {
                 tradeIDRef_ = tradeNode.Attributes["href"].Value;
             }
             else
             {
                 trade_ = new Trade(tradeNode);
             }
         }
         else
         {
             trade_ = new Trade(tradeNode);
         }
     }
     
 
     XmlNode clearingStatusValueNode = xmlNode.SelectSingleNode("clearingStatusValue");
     
     if (clearingStatusValueNode != null)
     {
         if (clearingStatusValueNode.Attributes["href"] != null || clearingStatusValueNode.Attributes["id"] != null) 
         {
             if (clearingStatusValueNode.Attributes["id"] != null) 
             {
                 clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["id"].Value;
                 ClearingStatusValue ob = new ClearingStatusValue(clearingStatusValueNode);
                 IDManager.SetID(clearingStatusValueIDRef_, ob);
             }
             else if (clearingStatusValueNode.Attributes["href"] != null)
             {
                 clearingStatusValueIDRef_ = clearingStatusValueNode.Attributes["href"].Value;
             }
             else
             {
                 clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode);
             }
         }
         else
         {
             clearingStatusValue_ = new ClearingStatusValue(clearingStatusValueNode);
         }
     }
     
 
     XmlNode updatedDateTimeNode = xmlNode.SelectSingleNode("updatedDateTime");
     
     if (updatedDateTimeNode != null)
     {
         if (updatedDateTimeNode.Attributes["href"] != null || updatedDateTimeNode.Attributes["id"] != null) 
         {
             if (updatedDateTimeNode.Attributes["id"] != null) 
             {
                 updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["id"].Value;
                 XsdTypeDateTime ob = new XsdTypeDateTime(updatedDateTimeNode);
                 IDManager.SetID(updatedDateTimeIDRef_, ob);
             }
             else if (updatedDateTimeNode.Attributes["href"] != null)
             {
                 updatedDateTimeIDRef_ = updatedDateTimeNode.Attributes["href"].Value;
             }
             else
             {
                 updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode);
             }
         }
         else
         {
             updatedDateTime_ = new XsdTypeDateTime(updatedDateTimeNode);
         }
     }
     
 
     XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");
     
     if (reasonNodeList != null)
     {
         this.reason_ = new List<Reason>();
         foreach (XmlNode item in reasonNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     reasonIDRef_ = item.Attributes["id"].Value;
                     reason_.Add(new Reason(item));
                     IDManager.SetID(reasonIDRef_, reason_[reason_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     reasonIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 reason_.Add(new Reason(item));
                 }
             }
             else
             {
                 reason_.Add(new Reason(item));
             }
         }
     }
     
 
     XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo");
     
     if (statusAppliesToNodeList != null)
     {
         this.statusAppliesTo_ = new List<PartyReference>();
         foreach (XmlNode item in statusAppliesToNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     statusAppliesToIDRef_ = item.Attributes["id"].Value;
                     statusAppliesTo_.Add(new PartyReference(item));
                     IDManager.SetID(statusAppliesToIDRef_, statusAppliesTo_[statusAppliesTo_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     statusAppliesToIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 statusAppliesTo_.Add(new PartyReference(item));
                 }
             }
             else
             {
                 statusAppliesTo_.Add(new PartyReference(item));
             }
         }
     }
     
 
 }
Ejemplo n.º 4
0
        public ClearingStatusItem(XmlNode 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 <TradeIdentifier> ob = new List <TradeIdentifier>();
                        ob.Add(new TradeIdentifier(item));
                        IDManager.SetID(tradeIdentifierIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeIdentifierIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeIdentifier.Add(new TradeIdentifier(item));
                    }
                }
            }


            XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation");

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

            foreach (XmlNode item in tradeReferenceInformationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        tradeReferenceInformationIDRef = item.Attributes["id"].Name;
                        TradeReferenceInformation ob = TradeReferenceInformation();
                        IDManager.SetID(tradeReferenceInformationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        tradeReferenceInformationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        tradeReferenceInformation = new TradeReferenceInformation(item);
                    }
                }
            }


            XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade");

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

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


            XmlNodeList clearingStatusValueNodeList = xmlNode.SelectNodes("clearingStatusValue");

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

            foreach (XmlNode item in clearingStatusValueNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        clearingStatusValueIDRef = item.Attributes["id"].Name;
                        ClearingStatusValue ob = ClearingStatusValue();
                        IDManager.SetID(clearingStatusValueIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        clearingStatusValueIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        clearingStatusValue = new ClearingStatusValue(item);
                    }
                }
            }


            XmlNodeList updatedDateTimeNodeList = xmlNode.SelectNodes("updatedDateTime");

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

            foreach (XmlNode item in updatedDateTimeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        updatedDateTimeIDRef = item.Attributes["id"].Name;
                        XsdTypeDateTime ob = XsdTypeDateTime();
                        IDManager.SetID(updatedDateTimeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        updatedDateTimeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        updatedDateTime = new XsdTypeDateTime(item);
                    }
                }
            }


            XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");

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


            XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo");

            foreach (XmlNode item in statusAppliesToNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        statusAppliesToIDRef = item.Attributes["id"].Name;
                        List <PartyReference> ob = new List <PartyReference>();
                        ob.Add(new PartyReference(item));
                        IDManager.SetID(statusAppliesToIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        statusAppliesToIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        statusAppliesTo.Add(new PartyReference(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);
         }
     }
     
 
 }
 public ClearingStatusItem(XmlNode 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<TradeIdentifier> ob = new List<TradeIdentifier>();
                 ob.Add(new TradeIdentifier(item));
                 IDManager.SetID(tradeIdentifierIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIdentifierIDRef = item.Attributes["href"].Name;
             }
             else
             {
             tradeIdentifier.Add(new TradeIdentifier(item));
             }
         }
     }
     
 
     XmlNodeList tradeReferenceInformationNodeList = xmlNode.SelectNodes("tradeReferenceInformation");
     if (tradeReferenceInformationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeReferenceInformationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeReferenceInformationIDRef = item.Attributes["id"].Name;
                 TradeReferenceInformation ob = TradeReferenceInformation();
                 IDManager.SetID(tradeReferenceInformationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeReferenceInformationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 tradeReferenceInformation = new TradeReferenceInformation(item);
             }
         }
     }
     
 
     XmlNodeList tradeNodeList = xmlNode.SelectNodes("trade");
     if (tradeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in tradeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 tradeIDRef = item.Attributes["id"].Name;
                 Trade ob = Trade();
                 IDManager.SetID(tradeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 tradeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 trade = new Trade(item);
             }
         }
     }
     
 
     XmlNodeList clearingStatusValueNodeList = xmlNode.SelectNodes("clearingStatusValue");
     if (clearingStatusValueNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in clearingStatusValueNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 clearingStatusValueIDRef = item.Attributes["id"].Name;
                 ClearingStatusValue ob = ClearingStatusValue();
                 IDManager.SetID(clearingStatusValueIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 clearingStatusValueIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 clearingStatusValue = new ClearingStatusValue(item);
             }
         }
     }
     
 
     XmlNodeList updatedDateTimeNodeList = xmlNode.SelectNodes("updatedDateTime");
     if (updatedDateTimeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in updatedDateTimeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 updatedDateTimeIDRef = item.Attributes["id"].Name;
                 XsdTypeDateTime ob = XsdTypeDateTime();
                 IDManager.SetID(updatedDateTimeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 updatedDateTimeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 updatedDateTime = new XsdTypeDateTime(item);
             }
         }
     }
     
 
     XmlNodeList reasonNodeList = xmlNode.SelectNodes("reason");
     
     foreach (XmlNode item in reasonNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 reasonIDRef = item.Attributes["id"].Name;
                 List<Reason> ob = new List<Reason>();
                 ob.Add(new Reason(item));
                 IDManager.SetID(reasonIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 reasonIDRef = item.Attributes["href"].Name;
             }
             else
             {
             reason.Add(new Reason(item));
             }
         }
     }
     
 
     XmlNodeList statusAppliesToNodeList = xmlNode.SelectNodes("statusAppliesTo");
     
     foreach (XmlNode item in statusAppliesToNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 statusAppliesToIDRef = item.Attributes["id"].Name;
                 List<PartyReference> ob = new List<PartyReference>();
                 ob.Add(new PartyReference(item));
                 IDManager.SetID(statusAppliesToIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 statusAppliesToIDRef = item.Attributes["href"].Name;
             }
             else
             {
             statusAppliesTo.Add(new PartyReference(item));
             }
         }
     }
     
 
 }