Пример #1
0
        public PartyRelationship(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 roleNodeList = xmlNode.SelectNodes("role");

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

            foreach (XmlNode item in roleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        roleIDRef = item.Attributes["id"].Name;
                        PartyRole ob = PartyRole();
                        IDManager.SetID(roleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        roleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        role = new PartyRole(item);
                    }
                }
            }


            XmlNodeList typeNodeList = xmlNode.SelectNodes("type");

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

            foreach (XmlNode item in typeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        typeIDRef = item.Attributes["id"].Name;
                        PartyRoleType ob = PartyRoleType();
                        IDManager.SetID(typeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        typeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        type = new PartyRoleType(item);
                    }
                }
            }


            XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");

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

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


            XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");

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

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


            XmlNodeList documentationNodeList = xmlNode.SelectNodes("documentation");

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

            foreach (XmlNode item in documentationNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        documentationIDRef = item.Attributes["id"].Name;
                        PartyRelationshipDocumentation ob = PartyRelationshipDocumentation();
                        IDManager.SetID(documentationIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        documentationIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        documentation = new PartyRelationshipDocumentation(item);
                    }
                }
            }
        }
 public RelatedParty(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);
         }
     }
     
 
     XmlNode roleNode = xmlNode.SelectSingleNode("role");
     
     if (roleNode != null)
     {
         if (roleNode.Attributes["href"] != null || roleNode.Attributes["id"] != null) 
         {
             if (roleNode.Attributes["id"] != null) 
             {
                 roleIDRef_ = roleNode.Attributes["id"].Value;
                 PartyRole ob = new PartyRole(roleNode);
                 IDManager.SetID(roleIDRef_, ob);
             }
             else if (roleNode.Attributes["href"] != null)
             {
                 roleIDRef_ = roleNode.Attributes["href"].Value;
             }
             else
             {
                 role_ = new PartyRole(roleNode);
             }
         }
         else
         {
             role_ = new PartyRole(roleNode);
         }
     }
     
 
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 PartyRoleType ob = new PartyRoleType(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new PartyRoleType(typeNode);
             }
         }
         else
         {
             type_ = new PartyRoleType(typeNode);
         }
     }
     
 
 }
Пример #3
0
        public RelatedParty(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 roleNodeList = xmlNode.SelectNodes("role");

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

            foreach (XmlNode item in roleNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        roleIDRef = item.Attributes["id"].Name;
                        PartyRole ob = PartyRole();
                        IDManager.SetID(roleIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        roleIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        role = new PartyRole(item);
                    }
                }
            }


            XmlNodeList typeNodeList = xmlNode.SelectNodes("type");

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

            foreach (XmlNode item in typeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        typeIDRef = item.Attributes["id"].Name;
                        PartyRoleType ob = PartyRoleType();
                        IDManager.SetID(typeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        typeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        type = new PartyRoleType(item);
                    }
                }
            }
        }
        public RelatedParty(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);
                }
            }


            XmlNode roleNode = xmlNode.SelectSingleNode("role");

            if (roleNode != null)
            {
                if (roleNode.Attributes["href"] != null || roleNode.Attributes["id"] != null)
                {
                    if (roleNode.Attributes["id"] != null)
                    {
                        roleIDRef_ = roleNode.Attributes["id"].Value;
                        PartyRole ob = new PartyRole(roleNode);
                        IDManager.SetID(roleIDRef_, ob);
                    }
                    else if (roleNode.Attributes["href"] != null)
                    {
                        roleIDRef_ = roleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        role_ = new PartyRole(roleNode);
                    }
                }
                else
                {
                    role_ = new PartyRole(roleNode);
                }
            }


            XmlNode typeNode = xmlNode.SelectSingleNode("type");

            if (typeNode != null)
            {
                if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null)
                {
                    if (typeNode.Attributes["id"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["id"].Value;
                        PartyRoleType ob = new PartyRoleType(typeNode);
                        IDManager.SetID(typeIDRef_, ob);
                    }
                    else if (typeNode.Attributes["href"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        type_ = new PartyRoleType(typeNode);
                    }
                }
                else
                {
                    type_ = new PartyRoleType(typeNode);
                }
            }
        }
 public RelatedParty(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 roleNodeList = xmlNode.SelectNodes("role");
     if (roleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in roleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 roleIDRef = item.Attributes["id"].Name;
                 PartyRole ob = PartyRole();
                 IDManager.SetID(roleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 roleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 role = new PartyRole(item);
             }
         }
     }
     
 
     XmlNodeList typeNodeList = xmlNode.SelectNodes("type");
     if (typeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in typeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 typeIDRef = item.Attributes["id"].Name;
                 PartyRoleType ob = PartyRoleType();
                 IDManager.SetID(typeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 typeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 type = new PartyRoleType(item);
             }
         }
     }
     
 
 }
 public PartyRelationship(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);
         }
     }
     
 
     XmlNode roleNode = xmlNode.SelectSingleNode("role");
     
     if (roleNode != null)
     {
         if (roleNode.Attributes["href"] != null || roleNode.Attributes["id"] != null) 
         {
             if (roleNode.Attributes["id"] != null) 
             {
                 roleIDRef_ = roleNode.Attributes["id"].Value;
                 PartyRole ob = new PartyRole(roleNode);
                 IDManager.SetID(roleIDRef_, ob);
             }
             else if (roleNode.Attributes["href"] != null)
             {
                 roleIDRef_ = roleNode.Attributes["href"].Value;
             }
             else
             {
                 role_ = new PartyRole(roleNode);
             }
         }
         else
         {
             role_ = new PartyRole(roleNode);
         }
     }
     
 
     XmlNode typeNode = xmlNode.SelectSingleNode("type");
     
     if (typeNode != null)
     {
         if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null) 
         {
             if (typeNode.Attributes["id"] != null) 
             {
                 typeIDRef_ = typeNode.Attributes["id"].Value;
                 PartyRoleType ob = new PartyRoleType(typeNode);
                 IDManager.SetID(typeIDRef_, ob);
             }
             else if (typeNode.Attributes["href"] != null)
             {
                 typeIDRef_ = typeNode.Attributes["href"].Value;
             }
             else
             {
                 type_ = new PartyRoleType(typeNode);
             }
         }
         else
         {
             type_ = new PartyRoleType(typeNode);
         }
     }
     
 
     XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");
     
     if (effectiveDateNode != null)
     {
         if (effectiveDateNode.Attributes["href"] != null || effectiveDateNode.Attributes["id"] != null) 
         {
             if (effectiveDateNode.Attributes["id"] != null) 
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(effectiveDateNode);
                 IDManager.SetID(effectiveDateIDRef_, ob);
             }
             else if (effectiveDateNode.Attributes["href"] != null)
             {
                 effectiveDateIDRef_ = effectiveDateNode.Attributes["href"].Value;
             }
             else
             {
                 effectiveDate_ = new XsdTypeDate(effectiveDateNode);
             }
         }
         else
         {
             effectiveDate_ = new XsdTypeDate(effectiveDateNode);
         }
     }
     
 
     XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");
     
     if (terminationDateNode != null)
     {
         if (terminationDateNode.Attributes["href"] != null || terminationDateNode.Attributes["id"] != null) 
         {
             if (terminationDateNode.Attributes["id"] != null) 
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["id"].Value;
                 XsdTypeDate ob = new XsdTypeDate(terminationDateNode);
                 IDManager.SetID(terminationDateIDRef_, ob);
             }
             else if (terminationDateNode.Attributes["href"] != null)
             {
                 terminationDateIDRef_ = terminationDateNode.Attributes["href"].Value;
             }
             else
             {
                 terminationDate_ = new XsdTypeDate(terminationDateNode);
             }
         }
         else
         {
             terminationDate_ = new XsdTypeDate(terminationDateNode);
         }
     }
     
 
     XmlNode documentationNode = xmlNode.SelectSingleNode("documentation");
     
     if (documentationNode != null)
     {
         if (documentationNode.Attributes["href"] != null || documentationNode.Attributes["id"] != null) 
         {
             if (documentationNode.Attributes["id"] != null) 
             {
                 documentationIDRef_ = documentationNode.Attributes["id"].Value;
                 PartyRelationshipDocumentation ob = new PartyRelationshipDocumentation(documentationNode);
                 IDManager.SetID(documentationIDRef_, ob);
             }
             else if (documentationNode.Attributes["href"] != null)
             {
                 documentationIDRef_ = documentationNode.Attributes["href"].Value;
             }
             else
             {
                 documentation_ = new PartyRelationshipDocumentation(documentationNode);
             }
         }
         else
         {
             documentation_ = new PartyRelationshipDocumentation(documentationNode);
         }
     }
     
 
 }
        public PartyRelationship(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);
                }
            }


            XmlNode roleNode = xmlNode.SelectSingleNode("role");

            if (roleNode != null)
            {
                if (roleNode.Attributes["href"] != null || roleNode.Attributes["id"] != null)
                {
                    if (roleNode.Attributes["id"] != null)
                    {
                        roleIDRef_ = roleNode.Attributes["id"].Value;
                        PartyRole ob = new PartyRole(roleNode);
                        IDManager.SetID(roleIDRef_, ob);
                    }
                    else if (roleNode.Attributes["href"] != null)
                    {
                        roleIDRef_ = roleNode.Attributes["href"].Value;
                    }
                    else
                    {
                        role_ = new PartyRole(roleNode);
                    }
                }
                else
                {
                    role_ = new PartyRole(roleNode);
                }
            }


            XmlNode typeNode = xmlNode.SelectSingleNode("type");

            if (typeNode != null)
            {
                if (typeNode.Attributes["href"] != null || typeNode.Attributes["id"] != null)
                {
                    if (typeNode.Attributes["id"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["id"].Value;
                        PartyRoleType ob = new PartyRoleType(typeNode);
                        IDManager.SetID(typeIDRef_, ob);
                    }
                    else if (typeNode.Attributes["href"] != null)
                    {
                        typeIDRef_ = typeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        type_ = new PartyRoleType(typeNode);
                    }
                }
                else
                {
                    type_ = new PartyRoleType(typeNode);
                }
            }


            XmlNode effectiveDateNode = xmlNode.SelectSingleNode("effectiveDate");

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


            XmlNode terminationDateNode = xmlNode.SelectSingleNode("terminationDate");

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


            XmlNode documentationNode = xmlNode.SelectSingleNode("documentation");

            if (documentationNode != null)
            {
                if (documentationNode.Attributes["href"] != null || documentationNode.Attributes["id"] != null)
                {
                    if (documentationNode.Attributes["id"] != null)
                    {
                        documentationIDRef_ = documentationNode.Attributes["id"].Value;
                        PartyRelationshipDocumentation ob = new PartyRelationshipDocumentation(documentationNode);
                        IDManager.SetID(documentationIDRef_, ob);
                    }
                    else if (documentationNode.Attributes["href"] != null)
                    {
                        documentationIDRef_ = documentationNode.Attributes["href"].Value;
                    }
                    else
                    {
                        documentation_ = new PartyRelationshipDocumentation(documentationNode);
                    }
                }
                else
                {
                    documentation_ = new PartyRelationshipDocumentation(documentationNode);
                }
            }
        }
 public PartyRelationship(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 roleNodeList = xmlNode.SelectNodes("role");
     if (roleNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in roleNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 roleIDRef = item.Attributes["id"].Name;
                 PartyRole ob = PartyRole();
                 IDManager.SetID(roleIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 roleIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 role = new PartyRole(item);
             }
         }
     }
     
 
     XmlNodeList typeNodeList = xmlNode.SelectNodes("type");
     if (typeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in typeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 typeIDRef = item.Attributes["id"].Name;
                 PartyRoleType ob = PartyRoleType();
                 IDManager.SetID(typeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 typeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 type = new PartyRoleType(item);
             }
         }
     }
     
 
     XmlNodeList effectiveDateNodeList = xmlNode.SelectNodes("effectiveDate");
     if (effectiveDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in effectiveDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 effectiveDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(effectiveDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 effectiveDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 effectiveDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList terminationDateNodeList = xmlNode.SelectNodes("terminationDate");
     if (terminationDateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in terminationDateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 terminationDateIDRef = item.Attributes["id"].Name;
                 XsdTypeDate ob = XsdTypeDate();
                 IDManager.SetID(terminationDateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 terminationDateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 terminationDate = new XsdTypeDate(item);
             }
         }
     }
     
 
     XmlNodeList documentationNodeList = xmlNode.SelectNodes("documentation");
     if (documentationNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in documentationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 documentationIDRef = item.Attributes["id"].Name;
                 PartyRelationshipDocumentation ob = PartyRelationshipDocumentation();
                 IDManager.SetID(documentationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 documentationIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 documentation = new PartyRelationshipDocumentation(item);
             }
         }
     }
     
 
 }