public Documentation(XmlNode xmlNode)
        {
            XmlNode masterAgreementNode = xmlNode.SelectSingleNode("masterAgreement");

            if (masterAgreementNode != null)
            {
                if (masterAgreementNode.Attributes["href"] != null || masterAgreementNode.Attributes["id"] != null)
                {
                    if (masterAgreementNode.Attributes["id"] != null)
                    {
                        masterAgreementIDRef_ = masterAgreementNode.Attributes["id"].Value;
                        MasterAgreement ob = new MasterAgreement(masterAgreementNode);
                        IDManager.SetID(masterAgreementIDRef_, ob);
                    }
                    else if (masterAgreementNode.Attributes["href"] != null)
                    {
                        masterAgreementIDRef_ = masterAgreementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        masterAgreement_ = new MasterAgreement(masterAgreementNode);
                    }
                }
                else
                {
                    masterAgreement_ = new MasterAgreement(masterAgreementNode);
                }
            }


            XmlNode masterConfirmationNode = xmlNode.SelectSingleNode("masterConfirmation");

            if (masterConfirmationNode != null)
            {
                if (masterConfirmationNode.Attributes["href"] != null || masterConfirmationNode.Attributes["id"] != null)
                {
                    if (masterConfirmationNode.Attributes["id"] != null)
                    {
                        masterConfirmationIDRef_ = masterConfirmationNode.Attributes["id"].Value;
                        MasterConfirmation ob = new MasterConfirmation(masterConfirmationNode);
                        IDManager.SetID(masterConfirmationIDRef_, ob);
                    }
                    else if (masterConfirmationNode.Attributes["href"] != null)
                    {
                        masterConfirmationIDRef_ = masterConfirmationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        masterConfirmation_ = new MasterConfirmation(masterConfirmationNode);
                    }
                }
                else
                {
                    masterConfirmation_ = new MasterConfirmation(masterConfirmationNode);
                }
            }


            XmlNode brokerConfirmationNode = xmlNode.SelectSingleNode("brokerConfirmation");

            if (brokerConfirmationNode != null)
            {
                if (brokerConfirmationNode.Attributes["href"] != null || brokerConfirmationNode.Attributes["id"] != null)
                {
                    if (brokerConfirmationNode.Attributes["id"] != null)
                    {
                        brokerConfirmationIDRef_ = brokerConfirmationNode.Attributes["id"].Value;
                        BrokerConfirmation ob = new BrokerConfirmation(brokerConfirmationNode);
                        IDManager.SetID(brokerConfirmationIDRef_, ob);
                    }
                    else if (brokerConfirmationNode.Attributes["href"] != null)
                    {
                        brokerConfirmationIDRef_ = brokerConfirmationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        brokerConfirmation_ = new BrokerConfirmation(brokerConfirmationNode);
                    }
                }
                else
                {
                    brokerConfirmation_ = new BrokerConfirmation(brokerConfirmationNode);
                }
            }


            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));
                    }
                }
            }


            XmlNodeList contractualMatrixNodeList = xmlNode.SelectNodes("contractualMatrix");

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


            XmlNode creditSupportAgreementNode = xmlNode.SelectSingleNode("creditSupportAgreement");

            if (creditSupportAgreementNode != null)
            {
                if (creditSupportAgreementNode.Attributes["href"] != null || creditSupportAgreementNode.Attributes["id"] != null)
                {
                    if (creditSupportAgreementNode.Attributes["id"] != null)
                    {
                        creditSupportAgreementIDRef_ = creditSupportAgreementNode.Attributes["id"].Value;
                        CreditSupportAgreement ob = new CreditSupportAgreement(creditSupportAgreementNode);
                        IDManager.SetID(creditSupportAgreementIDRef_, ob);
                    }
                    else if (creditSupportAgreementNode.Attributes["href"] != null)
                    {
                        creditSupportAgreementIDRef_ = creditSupportAgreementNode.Attributes["href"].Value;
                    }
                    else
                    {
                        creditSupportAgreement_ = new CreditSupportAgreement(creditSupportAgreementNode);
                    }
                }
                else
                {
                    creditSupportAgreement_ = new CreditSupportAgreement(creditSupportAgreementNode);
                }
            }


            XmlNodeList attachmentNodeList = xmlNode.SelectNodes("attachment");

            if (attachmentNodeList != null)
            {
                this.attachment_ = new List <Resource>();
                foreach (XmlNode item in attachmentNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            attachmentIDRef_ = item.Attributes["id"].Value;
                            attachment_.Add(new Resource(item));
                            IDManager.SetID(attachmentIDRef_, attachment_[attachment_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            attachmentIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            attachment_.Add(new Resource(item));
                        }
                    }
                    else
                    {
                        attachment_.Add(new Resource(item));
                    }
                }
            }
        }
 public Documentation(XmlNode xmlNode)
 {
     XmlNodeList masterAgreementNodeList = xmlNode.SelectNodes("masterAgreement");
     if (masterAgreementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in masterAgreementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 masterAgreementIDRef = item.Attributes["id"].Name;
                 MasterAgreement ob = MasterAgreement();
                 IDManager.SetID(masterAgreementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 masterAgreementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 masterAgreement = new MasterAgreement(item);
             }
         }
     }
     
 
     XmlNodeList masterConfirmationNodeList = xmlNode.SelectNodes("masterConfirmation");
     if (masterConfirmationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in masterConfirmationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 masterConfirmationIDRef = item.Attributes["id"].Name;
                 MasterConfirmation ob = MasterConfirmation();
                 IDManager.SetID(masterConfirmationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 masterConfirmationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 masterConfirmation = new MasterConfirmation(item);
             }
         }
     }
     
 
     XmlNodeList brokerConfirmationNodeList = xmlNode.SelectNodes("brokerConfirmation");
     if (brokerConfirmationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in brokerConfirmationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 brokerConfirmationIDRef = item.Attributes["id"].Name;
                 BrokerConfirmation ob = BrokerConfirmation();
                 IDManager.SetID(brokerConfirmationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 brokerConfirmationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 brokerConfirmation = new BrokerConfirmation(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 contractualMatrixNodeList = xmlNode.SelectNodes("contractualMatrix");
     
     foreach (XmlNode item in contractualMatrixNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contractualMatrixIDRef = item.Attributes["id"].Name;
                 List<ContractualMatrix> ob = new List<ContractualMatrix>();
                 ob.Add(new ContractualMatrix(item));
                 IDManager.SetID(contractualMatrixIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contractualMatrixIDRef = item.Attributes["href"].Name;
             }
             else
             {
             contractualMatrix.Add(new ContractualMatrix(item));
             }
         }
     }
     
 
     XmlNodeList creditSupportAgreementNodeList = xmlNode.SelectNodes("creditSupportAgreement");
     if (creditSupportAgreementNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in creditSupportAgreementNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditSupportAgreementIDRef = item.Attributes["id"].Name;
                 CreditSupportAgreement ob = CreditSupportAgreement();
                 IDManager.SetID(creditSupportAgreementIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditSupportAgreementIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 creditSupportAgreement = new CreditSupportAgreement(item);
             }
         }
     }
     
 
     XmlNodeList attachmentNodeList = xmlNode.SelectNodes("attachment");
     
     foreach (XmlNode item in attachmentNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 attachmentIDRef = item.Attributes["id"].Name;
                 List<Resource> ob = new List<Resource>();
                 ob.Add(new Resource(item));
                 IDManager.SetID(attachmentIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 attachmentIDRef = item.Attributes["href"].Name;
             }
             else
             {
             attachment.Add(new Resource(item));
             }
         }
     }
     
 
 }
        public Documentation(XmlNode xmlNode)
        {
            XmlNodeList masterAgreementNodeList = xmlNode.SelectNodes("masterAgreement");

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

            foreach (XmlNode item in masterAgreementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        masterAgreementIDRef = item.Attributes["id"].Name;
                        MasterAgreement ob = MasterAgreement();
                        IDManager.SetID(masterAgreementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        masterAgreementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        masterAgreement = new MasterAgreement(item);
                    }
                }
            }


            XmlNodeList masterConfirmationNodeList = xmlNode.SelectNodes("masterConfirmation");

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

            foreach (XmlNode item in masterConfirmationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        masterConfirmationIDRef = item.Attributes["id"].Name;
                        MasterConfirmation ob = MasterConfirmation();
                        IDManager.SetID(masterConfirmationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        masterConfirmationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        masterConfirmation = new MasterConfirmation(item);
                    }
                }
            }


            XmlNodeList brokerConfirmationNodeList = xmlNode.SelectNodes("brokerConfirmation");

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

            foreach (XmlNode item in brokerConfirmationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        brokerConfirmationIDRef = item.Attributes["id"].Name;
                        BrokerConfirmation ob = BrokerConfirmation();
                        IDManager.SetID(brokerConfirmationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        brokerConfirmationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        brokerConfirmation = new BrokerConfirmation(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 contractualMatrixNodeList = xmlNode.SelectNodes("contractualMatrix");

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


            XmlNodeList creditSupportAgreementNodeList = xmlNode.SelectNodes("creditSupportAgreement");

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

            foreach (XmlNode item in creditSupportAgreementNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        creditSupportAgreementIDRef = item.Attributes["id"].Name;
                        CreditSupportAgreement ob = CreditSupportAgreement();
                        IDManager.SetID(creditSupportAgreementIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        creditSupportAgreementIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        creditSupportAgreement = new CreditSupportAgreement(item);
                    }
                }
            }


            XmlNodeList attachmentNodeList = xmlNode.SelectNodes("attachment");

            foreach (XmlNode item in attachmentNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        attachmentIDRef = item.Attributes["id"].Name;
                        List <Resource> ob = new List <Resource>();
                        ob.Add(new Resource(item));
                        IDManager.SetID(attachmentIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        attachmentIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        attachment.Add(new Resource(item));
                    }
                }
            }
        }
 public Documentation(XmlNode xmlNode)
 {
     XmlNode masterAgreementNode = xmlNode.SelectSingleNode("masterAgreement");
     
     if (masterAgreementNode != null)
     {
         if (masterAgreementNode.Attributes["href"] != null || masterAgreementNode.Attributes["id"] != null) 
         {
             if (masterAgreementNode.Attributes["id"] != null) 
             {
                 masterAgreementIDRef_ = masterAgreementNode.Attributes["id"].Value;
                 MasterAgreement ob = new MasterAgreement(masterAgreementNode);
                 IDManager.SetID(masterAgreementIDRef_, ob);
             }
             else if (masterAgreementNode.Attributes["href"] != null)
             {
                 masterAgreementIDRef_ = masterAgreementNode.Attributes["href"].Value;
             }
             else
             {
                 masterAgreement_ = new MasterAgreement(masterAgreementNode);
             }
         }
         else
         {
             masterAgreement_ = new MasterAgreement(masterAgreementNode);
         }
     }
     
 
     XmlNode masterConfirmationNode = xmlNode.SelectSingleNode("masterConfirmation");
     
     if (masterConfirmationNode != null)
     {
         if (masterConfirmationNode.Attributes["href"] != null || masterConfirmationNode.Attributes["id"] != null) 
         {
             if (masterConfirmationNode.Attributes["id"] != null) 
             {
                 masterConfirmationIDRef_ = masterConfirmationNode.Attributes["id"].Value;
                 MasterConfirmation ob = new MasterConfirmation(masterConfirmationNode);
                 IDManager.SetID(masterConfirmationIDRef_, ob);
             }
             else if (masterConfirmationNode.Attributes["href"] != null)
             {
                 masterConfirmationIDRef_ = masterConfirmationNode.Attributes["href"].Value;
             }
             else
             {
                 masterConfirmation_ = new MasterConfirmation(masterConfirmationNode);
             }
         }
         else
         {
             masterConfirmation_ = new MasterConfirmation(masterConfirmationNode);
         }
     }
     
 
     XmlNode brokerConfirmationNode = xmlNode.SelectSingleNode("brokerConfirmation");
     
     if (brokerConfirmationNode != null)
     {
         if (brokerConfirmationNode.Attributes["href"] != null || brokerConfirmationNode.Attributes["id"] != null) 
         {
             if (brokerConfirmationNode.Attributes["id"] != null) 
             {
                 brokerConfirmationIDRef_ = brokerConfirmationNode.Attributes["id"].Value;
                 BrokerConfirmation ob = new BrokerConfirmation(brokerConfirmationNode);
                 IDManager.SetID(brokerConfirmationIDRef_, ob);
             }
             else if (brokerConfirmationNode.Attributes["href"] != null)
             {
                 brokerConfirmationIDRef_ = brokerConfirmationNode.Attributes["href"].Value;
             }
             else
             {
                 brokerConfirmation_ = new BrokerConfirmation(brokerConfirmationNode);
             }
         }
         else
         {
             brokerConfirmation_ = new BrokerConfirmation(brokerConfirmationNode);
         }
     }
     
 
     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));
             }
         }
     }
     
 
     XmlNodeList contractualMatrixNodeList = xmlNode.SelectNodes("contractualMatrix");
     
     if (contractualMatrixNodeList != null)
     {
         this.contractualMatrix_ = new List<ContractualMatrix>();
         foreach (XmlNode item in contractualMatrixNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     contractualMatrixIDRef_ = item.Attributes["id"].Value;
                     contractualMatrix_.Add(new ContractualMatrix(item));
                     IDManager.SetID(contractualMatrixIDRef_, contractualMatrix_[contractualMatrix_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     contractualMatrixIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 contractualMatrix_.Add(new ContractualMatrix(item));
                 }
             }
             else
             {
                 contractualMatrix_.Add(new ContractualMatrix(item));
             }
         }
     }
     
 
     XmlNode creditSupportAgreementNode = xmlNode.SelectSingleNode("creditSupportAgreement");
     
     if (creditSupportAgreementNode != null)
     {
         if (creditSupportAgreementNode.Attributes["href"] != null || creditSupportAgreementNode.Attributes["id"] != null) 
         {
             if (creditSupportAgreementNode.Attributes["id"] != null) 
             {
                 creditSupportAgreementIDRef_ = creditSupportAgreementNode.Attributes["id"].Value;
                 CreditSupportAgreement ob = new CreditSupportAgreement(creditSupportAgreementNode);
                 IDManager.SetID(creditSupportAgreementIDRef_, ob);
             }
             else if (creditSupportAgreementNode.Attributes["href"] != null)
             {
                 creditSupportAgreementIDRef_ = creditSupportAgreementNode.Attributes["href"].Value;
             }
             else
             {
                 creditSupportAgreement_ = new CreditSupportAgreement(creditSupportAgreementNode);
             }
         }
         else
         {
             creditSupportAgreement_ = new CreditSupportAgreement(creditSupportAgreementNode);
         }
     }
     
 
     XmlNodeList attachmentNodeList = xmlNode.SelectNodes("attachment");
     
     if (attachmentNodeList != null)
     {
         this.attachment_ = new List<Resource>();
         foreach (XmlNode item in attachmentNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     attachmentIDRef_ = item.Attributes["id"].Value;
                     attachment_.Add(new Resource(item));
                     IDManager.SetID(attachmentIDRef_, attachment_[attachment_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     attachmentIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 attachment_.Add(new Resource(item));
                 }
             }
             else
             {
                 attachment_.Add(new Resource(item));
             }
         }
     }
     
 
 }