public Account(XmlNode xmlNode)
 {
     XmlNodeList accountIdNodeList = xmlNode.SelectNodes("accountId");
     
     if (accountIdNodeList != null)
     {
         this.accountId_ = new List<AccountId>();
         foreach (XmlNode item in accountIdNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     accountIdIDRef_ = item.Attributes["id"].Value;
                     accountId_.Add(new AccountId(item));
                     IDManager.SetID(accountIdIDRef_, accountId_[accountId_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     accountIdIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 accountId_.Add(new AccountId(item));
                 }
             }
             else
             {
                 accountId_.Add(new AccountId(item));
             }
         }
     }
     
 
     XmlNode accountNameNode = xmlNode.SelectSingleNode("accountName");
     
     if (accountNameNode != null)
     {
         if (accountNameNode.Attributes["href"] != null || accountNameNode.Attributes["id"] != null) 
         {
             if (accountNameNode.Attributes["id"] != null) 
             {
                 accountNameIDRef_ = accountNameNode.Attributes["id"].Value;
                 AccountName ob = new AccountName(accountNameNode);
                 IDManager.SetID(accountNameIDRef_, ob);
             }
             else if (accountNameNode.Attributes["href"] != null)
             {
                 accountNameIDRef_ = accountNameNode.Attributes["href"].Value;
             }
             else
             {
                 accountName_ = new AccountName(accountNameNode);
             }
         }
         else
         {
             accountName_ = new AccountName(accountNameNode);
         }
     }
     
 
     XmlNode accountTypeNode = xmlNode.SelectSingleNode("accountType");
     
     if (accountTypeNode != null)
     {
         if (accountTypeNode.Attributes["href"] != null || accountTypeNode.Attributes["id"] != null) 
         {
             if (accountTypeNode.Attributes["id"] != null) 
             {
                 accountTypeIDRef_ = accountTypeNode.Attributes["id"].Value;
                 AccountType ob = new AccountType(accountTypeNode);
                 IDManager.SetID(accountTypeIDRef_, ob);
             }
             else if (accountTypeNode.Attributes["href"] != null)
             {
                 accountTypeIDRef_ = accountTypeNode.Attributes["href"].Value;
             }
             else
             {
                 accountType_ = new AccountType(accountTypeNode);
             }
         }
         else
         {
             accountType_ = new AccountType(accountTypeNode);
         }
     }
     
 
     XmlNode accountBeneficiaryNode = xmlNode.SelectSingleNode("accountBeneficiary");
     
     if (accountBeneficiaryNode != null)
     {
         if (accountBeneficiaryNode.Attributes["href"] != null || accountBeneficiaryNode.Attributes["id"] != null) 
         {
             if (accountBeneficiaryNode.Attributes["id"] != null) 
             {
                 accountBeneficiaryIDRef_ = accountBeneficiaryNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(accountBeneficiaryNode);
                 IDManager.SetID(accountBeneficiaryIDRef_, ob);
             }
             else if (accountBeneficiaryNode.Attributes["href"] != null)
             {
                 accountBeneficiaryIDRef_ = accountBeneficiaryNode.Attributes["href"].Value;
             }
             else
             {
                 accountBeneficiary_ = new PartyReference(accountBeneficiaryNode);
             }
         }
         else
         {
             accountBeneficiary_ = new PartyReference(accountBeneficiaryNode);
         }
     }
     
 
     XmlNode servicingPartyNode = xmlNode.SelectSingleNode("servicingParty");
     
     if (servicingPartyNode != null)
     {
         if (servicingPartyNode.Attributes["href"] != null || servicingPartyNode.Attributes["id"] != null) 
         {
             if (servicingPartyNode.Attributes["id"] != null) 
             {
                 servicingPartyIDRef_ = servicingPartyNode.Attributes["id"].Value;
                 PartyReference ob = new PartyReference(servicingPartyNode);
                 IDManager.SetID(servicingPartyIDRef_, ob);
             }
             else if (servicingPartyNode.Attributes["href"] != null)
             {
                 servicingPartyIDRef_ = servicingPartyNode.Attributes["href"].Value;
             }
             else
             {
                 servicingParty_ = new PartyReference(servicingPartyNode);
             }
         }
         else
         {
             servicingParty_ = new PartyReference(servicingPartyNode);
         }
     }
     
 
 }
        public Account(XmlNode xmlNode)
        {
            XmlNodeList accountIdNodeList = xmlNode.SelectNodes("accountId");

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


            XmlNodeList accountNameNodeList = xmlNode.SelectNodes("accountName");

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

            foreach (XmlNode item in accountNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        accountNameIDRef = item.Attributes["id"].Name;
                        AccountName ob = AccountName();
                        IDManager.SetID(accountNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        accountNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        accountName = new AccountName(item);
                    }
                }
            }


            XmlNodeList accountTypeNodeList = xmlNode.SelectNodes("accountType");

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

            foreach (XmlNode item in accountTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        accountTypeIDRef = item.Attributes["id"].Name;
                        AccountType ob = AccountType();
                        IDManager.SetID(accountTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        accountTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        accountType = new AccountType(item);
                    }
                }
            }


            XmlNodeList accountBeneficiaryNodeList = xmlNode.SelectNodes("accountBeneficiary");

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

            foreach (XmlNode item in accountBeneficiaryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        accountBeneficiaryIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(accountBeneficiaryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        accountBeneficiaryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        accountBeneficiary = new PartyReference(item);
                    }
                }
            }


            XmlNodeList servicingPartyNodeList = xmlNode.SelectNodes("servicingParty");

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

            foreach (XmlNode item in servicingPartyNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        servicingPartyIDRef = item.Attributes["id"].Name;
                        PartyReference ob = PartyReference();
                        IDManager.SetID(servicingPartyIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        servicingPartyIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        servicingParty = new PartyReference(item);
                    }
                }
            }
        }
        public Account(XmlNode xmlNode)
        {
            XmlNodeList accountIdNodeList = xmlNode.SelectNodes("accountId");

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


            XmlNode accountNameNode = xmlNode.SelectSingleNode("accountName");

            if (accountNameNode != null)
            {
                if (accountNameNode.Attributes["href"] != null || accountNameNode.Attributes["id"] != null)
                {
                    if (accountNameNode.Attributes["id"] != null)
                    {
                        accountNameIDRef_ = accountNameNode.Attributes["id"].Value;
                        AccountName ob = new AccountName(accountNameNode);
                        IDManager.SetID(accountNameIDRef_, ob);
                    }
                    else if (accountNameNode.Attributes["href"] != null)
                    {
                        accountNameIDRef_ = accountNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        accountName_ = new AccountName(accountNameNode);
                    }
                }
                else
                {
                    accountName_ = new AccountName(accountNameNode);
                }
            }


            XmlNode accountTypeNode = xmlNode.SelectSingleNode("accountType");

            if (accountTypeNode != null)
            {
                if (accountTypeNode.Attributes["href"] != null || accountTypeNode.Attributes["id"] != null)
                {
                    if (accountTypeNode.Attributes["id"] != null)
                    {
                        accountTypeIDRef_ = accountTypeNode.Attributes["id"].Value;
                        AccountType ob = new AccountType(accountTypeNode);
                        IDManager.SetID(accountTypeIDRef_, ob);
                    }
                    else if (accountTypeNode.Attributes["href"] != null)
                    {
                        accountTypeIDRef_ = accountTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        accountType_ = new AccountType(accountTypeNode);
                    }
                }
                else
                {
                    accountType_ = new AccountType(accountTypeNode);
                }
            }


            XmlNode accountBeneficiaryNode = xmlNode.SelectSingleNode("accountBeneficiary");

            if (accountBeneficiaryNode != null)
            {
                if (accountBeneficiaryNode.Attributes["href"] != null || accountBeneficiaryNode.Attributes["id"] != null)
                {
                    if (accountBeneficiaryNode.Attributes["id"] != null)
                    {
                        accountBeneficiaryIDRef_ = accountBeneficiaryNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(accountBeneficiaryNode);
                        IDManager.SetID(accountBeneficiaryIDRef_, ob);
                    }
                    else if (accountBeneficiaryNode.Attributes["href"] != null)
                    {
                        accountBeneficiaryIDRef_ = accountBeneficiaryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        accountBeneficiary_ = new PartyReference(accountBeneficiaryNode);
                    }
                }
                else
                {
                    accountBeneficiary_ = new PartyReference(accountBeneficiaryNode);
                }
            }


            XmlNode servicingPartyNode = xmlNode.SelectSingleNode("servicingParty");

            if (servicingPartyNode != null)
            {
                if (servicingPartyNode.Attributes["href"] != null || servicingPartyNode.Attributes["id"] != null)
                {
                    if (servicingPartyNode.Attributes["id"] != null)
                    {
                        servicingPartyIDRef_ = servicingPartyNode.Attributes["id"].Value;
                        PartyReference ob = new PartyReference(servicingPartyNode);
                        IDManager.SetID(servicingPartyIDRef_, ob);
                    }
                    else if (servicingPartyNode.Attributes["href"] != null)
                    {
                        servicingPartyIDRef_ = servicingPartyNode.Attributes["href"].Value;
                    }
                    else
                    {
                        servicingParty_ = new PartyReference(servicingPartyNode);
                    }
                }
                else
                {
                    servicingParty_ = new PartyReference(servicingPartyNode);
                }
            }
        }
 public Account(XmlNode xmlNode)
 {
     XmlNodeList accountIdNodeList = xmlNode.SelectNodes("accountId");
     
     foreach (XmlNode item in accountIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountIdIDRef = item.Attributes["id"].Name;
                 List<AccountId> ob = new List<AccountId>();
                 ob.Add(new AccountId(item));
                 IDManager.SetID(accountIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
             accountId.Add(new AccountId(item));
             }
         }
     }
     
 
     XmlNodeList accountNameNodeList = xmlNode.SelectNodes("accountName");
     if (accountNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountNameIDRef = item.Attributes["id"].Name;
                 AccountName ob = AccountName();
                 IDManager.SetID(accountNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountName = new AccountName(item);
             }
         }
     }
     
 
     XmlNodeList accountTypeNodeList = xmlNode.SelectNodes("accountType");
     if (accountTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountTypeIDRef = item.Attributes["id"].Name;
                 AccountType ob = AccountType();
                 IDManager.SetID(accountTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountType = new AccountType(item);
             }
         }
     }
     
 
     XmlNodeList accountBeneficiaryNodeList = xmlNode.SelectNodes("accountBeneficiary");
     if (accountBeneficiaryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in accountBeneficiaryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 accountBeneficiaryIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(accountBeneficiaryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 accountBeneficiaryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 accountBeneficiary = new PartyReference(item);
             }
         }
     }
     
 
     XmlNodeList servicingPartyNodeList = xmlNode.SelectNodes("servicingParty");
     if (servicingPartyNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in servicingPartyNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 servicingPartyIDRef = item.Attributes["id"].Name;
                 PartyReference ob = PartyReference();
                 IDManager.SetID(servicingPartyIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 servicingPartyIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 servicingParty = new PartyReference(item);
             }
         }
     }
     
 
 }