public BusinessUnit(XmlNode xmlNode)
 {
     XmlNode nameNode = xmlNode.SelectSingleNode("name");
     
     if (nameNode != null)
     {
         if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null) 
         {
             if (nameNode.Attributes["id"] != null) 
             {
                 nameIDRef_ = nameNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(nameNode);
                 IDManager.SetID(nameIDRef_, ob);
             }
             else if (nameNode.Attributes["href"] != null)
             {
                 nameIDRef_ = nameNode.Attributes["href"].Value;
             }
             else
             {
                 name_ = new XsdTypeString(nameNode);
             }
         }
         else
         {
             name_ = new XsdTypeString(nameNode);
         }
     }
     
 
     XmlNode businessUnitIdNode = xmlNode.SelectSingleNode("businessUnitId");
     
     if (businessUnitIdNode != null)
     {
         if (businessUnitIdNode.Attributes["href"] != null || businessUnitIdNode.Attributes["id"] != null) 
         {
             if (businessUnitIdNode.Attributes["id"] != null) 
             {
                 businessUnitIdIDRef_ = businessUnitIdNode.Attributes["id"].Value;
                 Unit ob = new Unit(businessUnitIdNode);
                 IDManager.SetID(businessUnitIdIDRef_, ob);
             }
             else if (businessUnitIdNode.Attributes["href"] != null)
             {
                 businessUnitIdIDRef_ = businessUnitIdNode.Attributes["href"].Value;
             }
             else
             {
                 businessUnitId_ = new Unit(businessUnitIdNode);
             }
         }
         else
         {
             businessUnitId_ = new Unit(businessUnitIdNode);
         }
     }
     
 
     XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");
     
     if (contactInfoNode != null)
     {
         if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null) 
         {
             if (contactInfoNode.Attributes["id"] != null) 
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                 ContactInformation ob = new ContactInformation(contactInfoNode);
                 IDManager.SetID(contactInfoIDRef_, ob);
             }
             else if (contactInfoNode.Attributes["href"] != null)
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
             }
             else
             {
                 contactInfo_ = new ContactInformation(contactInfoNode);
             }
         }
         else
         {
             contactInfo_ = new ContactInformation(contactInfoNode);
         }
     }
     
 
     XmlNode countryNode = xmlNode.SelectSingleNode("country");
     
     if (countryNode != null)
     {
         if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null) 
         {
             if (countryNode.Attributes["id"] != null) 
             {
                 countryIDRef_ = countryNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(countryNode);
                 IDManager.SetID(countryIDRef_, ob);
             }
             else if (countryNode.Attributes["href"] != null)
             {
                 countryIDRef_ = countryNode.Attributes["href"].Value;
             }
             else
             {
                 country_ = new CountryCode(countryNode);
             }
         }
         else
         {
             country_ = new CountryCode(countryNode);
         }
     }
     
 
 }
 public Person(XmlNode xmlNode)
 {
     XmlNodeList honorificNodeList = xmlNode.SelectNodes("honorific");
     if (honorificNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in honorificNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 honorificIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(honorificIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 honorificIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 honorific = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList firstNameNodeList = xmlNode.SelectNodes("firstName");
     if (firstNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in firstNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 firstNameIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(firstNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 firstNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 firstName = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");
     
     foreach (XmlNode item in middleNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 middleNameIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString();
                 ob.Add(new XsdTypeNormalizedString(item));
                 IDManager.SetID(middleNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 middleNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
             middleName.Add(new XsdTypeNormalizedString(item));
             }
         }
     }
     
 
     XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");
     
     foreach (XmlNode item in initialNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialIDRef = item.Attributes["id"].Name;
                 List<Initial> ob = new List<Initial>();
                 ob.Add(new Initial(item));
                 IDManager.SetID(initialIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialIDRef = item.Attributes["href"].Name;
             }
             else
             {
             initial.Add(new Initial(item));
             }
         }
     }
     
 
     XmlNodeList surnameNodeList = xmlNode.SelectNodes("surname");
     if (surnameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in surnameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 surnameIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(surnameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 surnameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 surname = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList suffixNodeList = xmlNode.SelectNodes("suffix");
     if (suffixNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in suffixNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 suffixIDRef = item.Attributes["id"].Name;
                 XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                 IDManager.SetID(suffixIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 suffixIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 suffix = new XsdTypeNormalizedString(item);
             }
         }
     }
     
 
     XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");
     
     foreach (XmlNode item in personIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 personIdIDRef = item.Attributes["id"].Name;
                 List<PersonId> ob = new List<PersonId>();
                 ob.Add(new PersonId(item));
                 IDManager.SetID(personIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 personIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
             personId.Add(new PersonId(item));
             }
         }
     }
     
 
     XmlNodeList businessUnitReferenceNodeList = xmlNode.SelectNodes("businessUnitReference");
     if (businessUnitReferenceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessUnitReferenceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessUnitReferenceIDRef = item.Attributes["id"].Name;
                 BusinessUnitReference ob = BusinessUnitReference();
                 IDManager.SetID(businessUnitReferenceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessUnitReferenceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessUnitReference = new BusinessUnitReference(item);
             }
         }
     }
     
 
     XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");
     if (contactInfoNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in contactInfoNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contactInfoIDRef = item.Attributes["id"].Name;
                 ContactInformation ob = ContactInformation();
                 IDManager.SetID(contactInfoIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contactInfoIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 contactInfo = new ContactInformation(item);
             }
         }
     }
     
 
     XmlNodeList countryNodeList = xmlNode.SelectNodes("country");
     if (countryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in countryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 countryIDRef = item.Attributes["id"].Name;
                 CountryCode ob = CountryCode();
                 IDManager.SetID(countryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 countryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 country = new CountryCode(item);
             }
         }
     }
     
 
 }
 public Party(XmlNode xmlNode)
 {
     XmlNodeList partyIdNodeList = xmlNode.SelectNodes("partyId");
     
     if (partyIdNodeList != null)
     {
         this.partyId_ = new List<PartyId>();
         foreach (XmlNode item in partyIdNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     partyIdIDRef_ = item.Attributes["id"].Value;
                     partyId_.Add(new PartyId(item));
                     IDManager.SetID(partyIdIDRef_, partyId_[partyId_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     partyIdIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 partyId_.Add(new PartyId(item));
                 }
             }
             else
             {
                 partyId_.Add(new PartyId(item));
             }
         }
     }
     
 
     XmlNode partyNameNode = xmlNode.SelectSingleNode("partyName");
     
     if (partyNameNode != null)
     {
         if (partyNameNode.Attributes["href"] != null || partyNameNode.Attributes["id"] != null) 
         {
             if (partyNameNode.Attributes["id"] != null) 
             {
                 partyNameIDRef_ = partyNameNode.Attributes["id"].Value;
                 PartyName ob = new PartyName(partyNameNode);
                 IDManager.SetID(partyNameIDRef_, ob);
             }
             else if (partyNameNode.Attributes["href"] != null)
             {
                 partyNameIDRef_ = partyNameNode.Attributes["href"].Value;
             }
             else
             {
                 partyName_ = new PartyName(partyNameNode);
             }
         }
         else
         {
             partyName_ = new PartyName(partyNameNode);
         }
     }
     
 
     XmlNodeList classificationNodeList = xmlNode.SelectNodes("classification");
     
     if (classificationNodeList != null)
     {
         this.classification_ = new List<IndustryClassification>();
         foreach (XmlNode item in classificationNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     classificationIDRef_ = item.Attributes["id"].Value;
                     classification_.Add(new IndustryClassification(item));
                     IDManager.SetID(classificationIDRef_, classification_[classification_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     classificationIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 classification_.Add(new IndustryClassification(item));
                 }
             }
             else
             {
                 classification_.Add(new IndustryClassification(item));
             }
         }
     }
     
 
     XmlNodeList creditRatingNodeList = xmlNode.SelectNodes("creditRating");
     
     if (creditRatingNodeList != null)
     {
         this.creditRating_ = new List<CreditRating>();
         foreach (XmlNode item in creditRatingNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     creditRatingIDRef_ = item.Attributes["id"].Value;
                     creditRating_.Add(new CreditRating(item));
                     IDManager.SetID(creditRatingIDRef_, creditRating_[creditRating_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     creditRatingIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 creditRating_.Add(new CreditRating(item));
                 }
             }
             else
             {
                 creditRating_.Add(new CreditRating(item));
             }
         }
     }
     
 
     XmlNode countryNode = xmlNode.SelectSingleNode("country");
     
     if (countryNode != null)
     {
         if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null) 
         {
             if (countryNode.Attributes["id"] != null) 
             {
                 countryIDRef_ = countryNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(countryNode);
                 IDManager.SetID(countryIDRef_, ob);
             }
             else if (countryNode.Attributes["href"] != null)
             {
                 countryIDRef_ = countryNode.Attributes["href"].Value;
             }
             else
             {
                 country_ = new CountryCode(countryNode);
             }
         }
         else
         {
             country_ = new CountryCode(countryNode);
         }
     }
     
 
     XmlNodeList jurisdictionNodeList = xmlNode.SelectNodes("jurisdiction");
     
     if (jurisdictionNodeList != null)
     {
         this.jurisdiction_ = new List<GoverningLaw>();
         foreach (XmlNode item in jurisdictionNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     jurisdictionIDRef_ = item.Attributes["id"].Value;
                     jurisdiction_.Add(new GoverningLaw(item));
                     IDManager.SetID(jurisdictionIDRef_, jurisdiction_[jurisdiction_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     jurisdictionIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 jurisdiction_.Add(new GoverningLaw(item));
                 }
             }
             else
             {
                 jurisdiction_.Add(new GoverningLaw(item));
             }
         }
     }
     
 
     XmlNode organizationTypeNode = xmlNode.SelectSingleNode("organizationType");
     
     if (organizationTypeNode != null)
     {
         if (organizationTypeNode.Attributes["href"] != null || organizationTypeNode.Attributes["id"] != null) 
         {
             if (organizationTypeNode.Attributes["id"] != null) 
             {
                 organizationTypeIDRef_ = organizationTypeNode.Attributes["id"].Value;
                 OrganizationType ob = new OrganizationType(organizationTypeNode);
                 IDManager.SetID(organizationTypeIDRef_, ob);
             }
             else if (organizationTypeNode.Attributes["href"] != null)
             {
                 organizationTypeIDRef_ = organizationTypeNode.Attributes["href"].Value;
             }
             else
             {
                 organizationType_ = new OrganizationType(organizationTypeNode);
             }
         }
         else
         {
             organizationType_ = new OrganizationType(organizationTypeNode);
         }
     }
     
 
     XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");
     
     if (contactInfoNode != null)
     {
         if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null) 
         {
             if (contactInfoNode.Attributes["id"] != null) 
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                 ContactInformation ob = new ContactInformation(contactInfoNode);
                 IDManager.SetID(contactInfoIDRef_, ob);
             }
             else if (contactInfoNode.Attributes["href"] != null)
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
             }
             else
             {
                 contactInfo_ = new ContactInformation(contactInfoNode);
             }
         }
         else
         {
             contactInfo_ = new ContactInformation(contactInfoNode);
         }
     }
     
 
     XmlNodeList businessUnitNodeList = xmlNode.SelectNodes("businessUnit");
     
     if (businessUnitNodeList != null)
     {
         this.businessUnit_ = new List<BusinessUnit>();
         foreach (XmlNode item in businessUnitNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     businessUnitIDRef_ = item.Attributes["id"].Value;
                     businessUnit_.Add(new BusinessUnit(item));
                     IDManager.SetID(businessUnitIDRef_, businessUnit_[businessUnit_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     businessUnitIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 businessUnit_.Add(new BusinessUnit(item));
                 }
             }
             else
             {
                 businessUnit_.Add(new BusinessUnit(item));
             }
         }
     }
     
 
     XmlNodeList personNodeList = xmlNode.SelectNodes("person");
     
     if (personNodeList != null)
     {
         this.person_ = new List<Person>();
         foreach (XmlNode item in personNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     personIDRef_ = item.Attributes["id"].Value;
                     person_.Add(new Person(item));
                     IDManager.SetID(personIDRef_, person_[person_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     personIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 person_.Add(new Person(item));
                 }
             }
             else
             {
                 person_.Add(new Person(item));
             }
         }
     }
     
 
 }
 public Party(XmlNode xmlNode)
 {
     XmlNodeList partyIdNodeList = xmlNode.SelectNodes("partyId");
     
     foreach (XmlNode item in partyIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyIdIDRef = item.Attributes["id"].Name;
                 List<PartyId> ob = new List<PartyId>();
                 ob.Add(new PartyId(item));
                 IDManager.SetID(partyIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
             partyId.Add(new PartyId(item));
             }
         }
     }
     
 
     XmlNodeList partyNameNodeList = xmlNode.SelectNodes("partyName");
     if (partyNameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in partyNameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 partyNameIDRef = item.Attributes["id"].Name;
                 PartyName ob = PartyName();
                 IDManager.SetID(partyNameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 partyNameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 partyName = new PartyName(item);
             }
         }
     }
     
 
     XmlNodeList classificationNodeList = xmlNode.SelectNodes("classification");
     
     foreach (XmlNode item in classificationNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 classificationIDRef = item.Attributes["id"].Name;
                 List<IndustryClassification> ob = new List<IndustryClassification>();
                 ob.Add(new IndustryClassification(item));
                 IDManager.SetID(classificationIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 classificationIDRef = item.Attributes["href"].Name;
             }
             else
             {
             classification.Add(new IndustryClassification(item));
             }
         }
     }
     
 
     XmlNodeList creditRatingNodeList = xmlNode.SelectNodes("creditRating");
     
     foreach (XmlNode item in creditRatingNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 creditRatingIDRef = item.Attributes["id"].Name;
                 List<CreditRating> ob = new List<CreditRating>();
                 ob.Add(new CreditRating(item));
                 IDManager.SetID(creditRatingIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 creditRatingIDRef = item.Attributes["href"].Name;
             }
             else
             {
             creditRating.Add(new CreditRating(item));
             }
         }
     }
     
 
     XmlNodeList countryNodeList = xmlNode.SelectNodes("country");
     if (countryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in countryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 countryIDRef = item.Attributes["id"].Name;
                 CountryCode ob = CountryCode();
                 IDManager.SetID(countryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 countryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 country = new CountryCode(item);
             }
         }
     }
     
 
     XmlNodeList jurisdictionNodeList = xmlNode.SelectNodes("jurisdiction");
     
     foreach (XmlNode item in jurisdictionNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 jurisdictionIDRef = item.Attributes["id"].Name;
                 List<GoverningLaw> ob = new List<GoverningLaw>();
                 ob.Add(new GoverningLaw(item));
                 IDManager.SetID(jurisdictionIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 jurisdictionIDRef = item.Attributes["href"].Name;
             }
             else
             {
             jurisdiction.Add(new GoverningLaw(item));
             }
         }
     }
     
 
     XmlNodeList organizationTypeNodeList = xmlNode.SelectNodes("organizationType");
     if (organizationTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in organizationTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 organizationTypeIDRef = item.Attributes["id"].Name;
                 OrganizationType ob = OrganizationType();
                 IDManager.SetID(organizationTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 organizationTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 organizationType = new OrganizationType(item);
             }
         }
     }
     
 
     XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");
     if (contactInfoNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in contactInfoNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contactInfoIDRef = item.Attributes["id"].Name;
                 ContactInformation ob = ContactInformation();
                 IDManager.SetID(contactInfoIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contactInfoIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 contactInfo = new ContactInformation(item);
             }
         }
     }
     
 
     XmlNodeList businessUnitNodeList = xmlNode.SelectNodes("businessUnit");
     
     foreach (XmlNode item in businessUnitNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessUnitIDRef = item.Attributes["id"].Name;
                 List<BusinessUnit> ob = new List<BusinessUnit>();
                 ob.Add(new BusinessUnit(item));
                 IDManager.SetID(businessUnitIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessUnitIDRef = item.Attributes["href"].Name;
             }
             else
             {
             businessUnit.Add(new BusinessUnit(item));
             }
         }
     }
     
 
     XmlNodeList personNodeList = xmlNode.SelectNodes("person");
     
     foreach (XmlNode item in personNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 personIDRef = item.Attributes["id"].Name;
                 List<Person> ob = new List<Person>();
                 ob.Add(new Person(item));
                 IDManager.SetID(personIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 personIDRef = item.Attributes["href"].Name;
             }
             else
             {
             person.Add(new Person(item));
             }
         }
     }
     
 
 }
Ejemplo n.º 5
0
        public Person(XmlNode xmlNode)
        {
            XmlNodeList honorificNodeList = xmlNode.SelectNodes("honorific");

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

            foreach (XmlNode item in honorificNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        honorificIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(honorificIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        honorificIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        honorific = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList firstNameNodeList = xmlNode.SelectNodes("firstName");

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

            foreach (XmlNode item in firstNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        firstNameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(firstNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        firstNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        firstName = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");

            foreach (XmlNode item in middleNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        middleNameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString();
                        ob.Add(new XsdTypeNormalizedString(item));
                        IDManager.SetID(middleNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        middleNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        middleName.Add(new XsdTypeNormalizedString(item));
                    }
                }
            }


            XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");

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


            XmlNodeList surnameNodeList = xmlNode.SelectNodes("surname");

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

            foreach (XmlNode item in surnameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        surnameIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(surnameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        surnameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        surname = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList suffixNodeList = xmlNode.SelectNodes("suffix");

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

            foreach (XmlNode item in suffixNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        suffixIDRef = item.Attributes["id"].Name;
                        XsdTypeNormalizedString ob = XsdTypeNormalizedString();
                        IDManager.SetID(suffixIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        suffixIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        suffix = new XsdTypeNormalizedString(item);
                    }
                }
            }


            XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");

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


            XmlNodeList businessUnitReferenceNodeList = xmlNode.SelectNodes("businessUnitReference");

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

            foreach (XmlNode item in businessUnitReferenceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessUnitReferenceIDRef = item.Attributes["id"].Name;
                        BusinessUnitReference ob = BusinessUnitReference();
                        IDManager.SetID(businessUnitReferenceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessUnitReferenceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessUnitReference = new BusinessUnitReference(item);
                    }
                }
            }


            XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");

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

            foreach (XmlNode item in contactInfoNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        contactInfoIDRef = item.Attributes["id"].Name;
                        ContactInformation ob = ContactInformation();
                        IDManager.SetID(contactInfoIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        contactInfoIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        contactInfo = new ContactInformation(item);
                    }
                }
            }


            XmlNodeList countryNodeList = xmlNode.SelectNodes("country");

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

            foreach (XmlNode item in countryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        countryIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(countryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        countryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        country = new CountryCode(item);
                    }
                }
            }
        }
        public BusinessUnit(XmlNode xmlNode)
        {
            XmlNodeList nameNodeList = xmlNode.SelectNodes("name");

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

            foreach (XmlNode item in nameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        nameIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(nameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        name = new XsdTypeString(item);
                    }
                }
            }


            XmlNodeList businessUnitIdNodeList = xmlNode.SelectNodes("businessUnitId");

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

            foreach (XmlNode item in businessUnitIdNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        businessUnitIdIDRef = item.Attributes["id"].Name;
                        Unit ob = Unit();
                        IDManager.SetID(businessUnitIdIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        businessUnitIdIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        businessUnitId = new Unit(item);
                    }
                }
            }


            XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");

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

            foreach (XmlNode item in contactInfoNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        contactInfoIDRef = item.Attributes["id"].Name;
                        ContactInformation ob = ContactInformation();
                        IDManager.SetID(contactInfoIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        contactInfoIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        contactInfo = new ContactInformation(item);
                    }
                }
            }


            XmlNodeList countryNodeList = xmlNode.SelectNodes("country");

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

            foreach (XmlNode item in countryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        countryIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(countryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        countryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        country = new CountryCode(item);
                    }
                }
            }
        }
        public BusinessUnit(XmlNode xmlNode)
        {
            XmlNode nameNode = xmlNode.SelectSingleNode("name");

            if (nameNode != null)
            {
                if (nameNode.Attributes["href"] != null || nameNode.Attributes["id"] != null)
                {
                    if (nameNode.Attributes["id"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(nameNode);
                        IDManager.SetID(nameIDRef_, ob);
                    }
                    else if (nameNode.Attributes["href"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        name_ = new XsdTypeString(nameNode);
                    }
                }
                else
                {
                    name_ = new XsdTypeString(nameNode);
                }
            }


            XmlNode businessUnitIdNode = xmlNode.SelectSingleNode("businessUnitId");

            if (businessUnitIdNode != null)
            {
                if (businessUnitIdNode.Attributes["href"] != null || businessUnitIdNode.Attributes["id"] != null)
                {
                    if (businessUnitIdNode.Attributes["id"] != null)
                    {
                        businessUnitIdIDRef_ = businessUnitIdNode.Attributes["id"].Value;
                        Unit ob = new Unit(businessUnitIdNode);
                        IDManager.SetID(businessUnitIdIDRef_, ob);
                    }
                    else if (businessUnitIdNode.Attributes["href"] != null)
                    {
                        businessUnitIdIDRef_ = businessUnitIdNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessUnitId_ = new Unit(businessUnitIdNode);
                    }
                }
                else
                {
                    businessUnitId_ = new Unit(businessUnitIdNode);
                }
            }


            XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");

            if (contactInfoNode != null)
            {
                if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null)
                {
                    if (contactInfoNode.Attributes["id"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                        ContactInformation ob = new ContactInformation(contactInfoNode);
                        IDManager.SetID(contactInfoIDRef_, ob);
                    }
                    else if (contactInfoNode.Attributes["href"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        contactInfo_ = new ContactInformation(contactInfoNode);
                    }
                }
                else
                {
                    contactInfo_ = new ContactInformation(contactInfoNode);
                }
            }


            XmlNode countryNode = xmlNode.SelectSingleNode("country");

            if (countryNode != null)
            {
                if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null)
                {
                    if (countryNode.Attributes["id"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(countryNode);
                        IDManager.SetID(countryIDRef_, ob);
                    }
                    else if (countryNode.Attributes["href"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        country_ = new CountryCode(countryNode);
                    }
                }
                else
                {
                    country_ = new CountryCode(countryNode);
                }
            }
        }
 public Person(XmlNode xmlNode)
 {
     XmlNode honorificNode = xmlNode.SelectSingleNode("honorific");
     
     if (honorificNode != null)
     {
         if (honorificNode.Attributes["href"] != null || honorificNode.Attributes["id"] != null) 
         {
             if (honorificNode.Attributes["id"] != null) 
             {
                 honorificIDRef_ = honorificNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(honorificNode);
                 IDManager.SetID(honorificIDRef_, ob);
             }
             else if (honorificNode.Attributes["href"] != null)
             {
                 honorificIDRef_ = honorificNode.Attributes["href"].Value;
             }
             else
             {
                 honorific_ = new XsdTypeNormalizedString(honorificNode);
             }
         }
         else
         {
             honorific_ = new XsdTypeNormalizedString(honorificNode);
         }
     }
     
 
     XmlNode firstNameNode = xmlNode.SelectSingleNode("firstName");
     
     if (firstNameNode != null)
     {
         if (firstNameNode.Attributes["href"] != null || firstNameNode.Attributes["id"] != null) 
         {
             if (firstNameNode.Attributes["id"] != null) 
             {
                 firstNameIDRef_ = firstNameNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(firstNameNode);
                 IDManager.SetID(firstNameIDRef_, ob);
             }
             else if (firstNameNode.Attributes["href"] != null)
             {
                 firstNameIDRef_ = firstNameNode.Attributes["href"].Value;
             }
             else
             {
                 firstName_ = new XsdTypeNormalizedString(firstNameNode);
             }
         }
         else
         {
             firstName_ = new XsdTypeNormalizedString(firstNameNode);
         }
     }
     
 
     XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");
     
     if (middleNameNodeList != null)
     {
         this.middleName_ = new List<XsdTypeNormalizedString>();
         foreach (XmlNode item in middleNameNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     middleNameIDRef_ = item.Attributes["id"].Value;
                     middleName_.Add(new XsdTypeNormalizedString(item));
                     IDManager.SetID(middleNameIDRef_, middleName_[middleName_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     middleNameIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 middleName_.Add(new XsdTypeNormalizedString(item));
                 }
             }
             else
             {
                 middleName_.Add(new XsdTypeNormalizedString(item));
             }
         }
     }
     
 
     XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");
     
     if (initialNodeList != null)
     {
         this.initial_ = new List<Initial>();
         foreach (XmlNode item in initialNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     initialIDRef_ = item.Attributes["id"].Value;
                     initial_.Add(new Initial(item));
                     IDManager.SetID(initialIDRef_, initial_[initial_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     initialIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 initial_.Add(new Initial(item));
                 }
             }
             else
             {
                 initial_.Add(new Initial(item));
             }
         }
     }
     
 
     XmlNode surnameNode = xmlNode.SelectSingleNode("surname");
     
     if (surnameNode != null)
     {
         if (surnameNode.Attributes["href"] != null || surnameNode.Attributes["id"] != null) 
         {
             if (surnameNode.Attributes["id"] != null) 
             {
                 surnameIDRef_ = surnameNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(surnameNode);
                 IDManager.SetID(surnameIDRef_, ob);
             }
             else if (surnameNode.Attributes["href"] != null)
             {
                 surnameIDRef_ = surnameNode.Attributes["href"].Value;
             }
             else
             {
                 surname_ = new XsdTypeNormalizedString(surnameNode);
             }
         }
         else
         {
             surname_ = new XsdTypeNormalizedString(surnameNode);
         }
     }
     
 
     XmlNode suffixNode = xmlNode.SelectSingleNode("suffix");
     
     if (suffixNode != null)
     {
         if (suffixNode.Attributes["href"] != null || suffixNode.Attributes["id"] != null) 
         {
             if (suffixNode.Attributes["id"] != null) 
             {
                 suffixIDRef_ = suffixNode.Attributes["id"].Value;
                 XsdTypeNormalizedString ob = new XsdTypeNormalizedString(suffixNode);
                 IDManager.SetID(suffixIDRef_, ob);
             }
             else if (suffixNode.Attributes["href"] != null)
             {
                 suffixIDRef_ = suffixNode.Attributes["href"].Value;
             }
             else
             {
                 suffix_ = new XsdTypeNormalizedString(suffixNode);
             }
         }
         else
         {
             suffix_ = new XsdTypeNormalizedString(suffixNode);
         }
     }
     
 
     XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");
     
     if (personIdNodeList != null)
     {
         this.personId_ = new List<PersonId>();
         foreach (XmlNode item in personIdNodeList)
         {
             if (item.Attributes["href"] != null || item.Attributes["id"] != null) 
             {
                 if (item.Attributes["id"] != null) 
                 {
                     personIdIDRef_ = item.Attributes["id"].Value;
                     personId_.Add(new PersonId(item));
                     IDManager.SetID(personIdIDRef_, personId_[personId_.Count - 1 ]);
                 }
                 else if (item.Attributes["href"] != null)
                 {
                     personIdIDRef_ = item.Attributes["href"].Value;
                 }
                 else
                 {
                 personId_.Add(new PersonId(item));
                 }
             }
             else
             {
                 personId_.Add(new PersonId(item));
             }
         }
     }
     
 
     XmlNode businessUnitReferenceNode = xmlNode.SelectSingleNode("businessUnitReference");
     
     if (businessUnitReferenceNode != null)
     {
         if (businessUnitReferenceNode.Attributes["href"] != null || businessUnitReferenceNode.Attributes["id"] != null) 
         {
             if (businessUnitReferenceNode.Attributes["id"] != null) 
             {
                 businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["id"].Value;
                 BusinessUnitReference ob = new BusinessUnitReference(businessUnitReferenceNode);
                 IDManager.SetID(businessUnitReferenceIDRef_, ob);
             }
             else if (businessUnitReferenceNode.Attributes["href"] != null)
             {
                 businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["href"].Value;
             }
             else
             {
                 businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
             }
         }
         else
         {
             businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
         }
     }
     
 
     XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");
     
     if (contactInfoNode != null)
     {
         if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null) 
         {
             if (contactInfoNode.Attributes["id"] != null) 
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                 ContactInformation ob = new ContactInformation(contactInfoNode);
                 IDManager.SetID(contactInfoIDRef_, ob);
             }
             else if (contactInfoNode.Attributes["href"] != null)
             {
                 contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
             }
             else
             {
                 contactInfo_ = new ContactInformation(contactInfoNode);
             }
         }
         else
         {
             contactInfo_ = new ContactInformation(contactInfoNode);
         }
     }
     
 
     XmlNode countryNode = xmlNode.SelectSingleNode("country");
     
     if (countryNode != null)
     {
         if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null) 
         {
             if (countryNode.Attributes["id"] != null) 
             {
                 countryIDRef_ = countryNode.Attributes["id"].Value;
                 CountryCode ob = new CountryCode(countryNode);
                 IDManager.SetID(countryIDRef_, ob);
             }
             else if (countryNode.Attributes["href"] != null)
             {
                 countryIDRef_ = countryNode.Attributes["href"].Value;
             }
             else
             {
                 country_ = new CountryCode(countryNode);
             }
         }
         else
         {
             country_ = new CountryCode(countryNode);
         }
     }
     
 
 }
        public Party(XmlNode xmlNode)
        {
            XmlNodeList partyIdNodeList = xmlNode.SelectNodes("partyId");

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


            XmlNode partyNameNode = xmlNode.SelectSingleNode("partyName");

            if (partyNameNode != null)
            {
                if (partyNameNode.Attributes["href"] != null || partyNameNode.Attributes["id"] != null)
                {
                    if (partyNameNode.Attributes["id"] != null)
                    {
                        partyNameIDRef_ = partyNameNode.Attributes["id"].Value;
                        PartyName ob = new PartyName(partyNameNode);
                        IDManager.SetID(partyNameIDRef_, ob);
                    }
                    else if (partyNameNode.Attributes["href"] != null)
                    {
                        partyNameIDRef_ = partyNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        partyName_ = new PartyName(partyNameNode);
                    }
                }
                else
                {
                    partyName_ = new PartyName(partyNameNode);
                }
            }


            XmlNodeList classificationNodeList = xmlNode.SelectNodes("classification");

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


            XmlNodeList creditRatingNodeList = xmlNode.SelectNodes("creditRating");

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


            XmlNode countryNode = xmlNode.SelectSingleNode("country");

            if (countryNode != null)
            {
                if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null)
                {
                    if (countryNode.Attributes["id"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(countryNode);
                        IDManager.SetID(countryIDRef_, ob);
                    }
                    else if (countryNode.Attributes["href"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        country_ = new CountryCode(countryNode);
                    }
                }
                else
                {
                    country_ = new CountryCode(countryNode);
                }
            }


            XmlNodeList jurisdictionNodeList = xmlNode.SelectNodes("jurisdiction");

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


            XmlNode organizationTypeNode = xmlNode.SelectSingleNode("organizationType");

            if (organizationTypeNode != null)
            {
                if (organizationTypeNode.Attributes["href"] != null || organizationTypeNode.Attributes["id"] != null)
                {
                    if (organizationTypeNode.Attributes["id"] != null)
                    {
                        organizationTypeIDRef_ = organizationTypeNode.Attributes["id"].Value;
                        OrganizationType ob = new OrganizationType(organizationTypeNode);
                        IDManager.SetID(organizationTypeIDRef_, ob);
                    }
                    else if (organizationTypeNode.Attributes["href"] != null)
                    {
                        organizationTypeIDRef_ = organizationTypeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        organizationType_ = new OrganizationType(organizationTypeNode);
                    }
                }
                else
                {
                    organizationType_ = new OrganizationType(organizationTypeNode);
                }
            }


            XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");

            if (contactInfoNode != null)
            {
                if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null)
                {
                    if (contactInfoNode.Attributes["id"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                        ContactInformation ob = new ContactInformation(contactInfoNode);
                        IDManager.SetID(contactInfoIDRef_, ob);
                    }
                    else if (contactInfoNode.Attributes["href"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        contactInfo_ = new ContactInformation(contactInfoNode);
                    }
                }
                else
                {
                    contactInfo_ = new ContactInformation(contactInfoNode);
                }
            }


            XmlNodeList businessUnitNodeList = xmlNode.SelectNodes("businessUnit");

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


            XmlNodeList personNodeList = xmlNode.SelectNodes("person");

            if (personNodeList != null)
            {
                this.person_ = new List <Person>();
                foreach (XmlNode item in personNodeList)
                {
                    if (item.Attributes["href"] != null || item.Attributes["id"] != null)
                    {
                        if (item.Attributes["id"] != null)
                        {
                            personIDRef_ = item.Attributes["id"].Value;
                            person_.Add(new Person(item));
                            IDManager.SetID(personIDRef_, person_[person_.Count - 1]);
                        }
                        else if (item.Attributes["href"] != null)
                        {
                            personIDRef_ = item.Attributes["href"].Value;
                        }
                        else
                        {
                            person_.Add(new Person(item));
                        }
                    }
                    else
                    {
                        person_.Add(new Person(item));
                    }
                }
            }
        }
 public BusinessUnit(XmlNode xmlNode)
 {
     XmlNodeList nameNodeList = xmlNode.SelectNodes("name");
     if (nameNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in nameNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 nameIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(nameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 name = new XsdTypeString(item);
             }
         }
     }
     
 
     XmlNodeList businessUnitIdNodeList = xmlNode.SelectNodes("businessUnitId");
     if (businessUnitIdNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in businessUnitIdNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 businessUnitIdIDRef = item.Attributes["id"].Name;
                 Unit ob = Unit();
                 IDManager.SetID(businessUnitIdIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 businessUnitIdIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 businessUnitId = new Unit(item);
             }
         }
     }
     
 
     XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");
     if (contactInfoNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in contactInfoNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 contactInfoIDRef = item.Attributes["id"].Name;
                 ContactInformation ob = ContactInformation();
                 IDManager.SetID(contactInfoIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 contactInfoIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 contactInfo = new ContactInformation(item);
             }
         }
     }
     
 
     XmlNodeList countryNodeList = xmlNode.SelectNodes("country");
     if (countryNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in countryNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 countryIDRef = item.Attributes["id"].Name;
                 CountryCode ob = CountryCode();
                 IDManager.SetID(countryIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 countryIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 country = new CountryCode(item);
             }
         }
     }
     
 
 }
Ejemplo n.º 11
0
        public Party(XmlNode xmlNode)
        {
            XmlNodeList partyIdNodeList = xmlNode.SelectNodes("partyId");

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


            XmlNodeList partyNameNodeList = xmlNode.SelectNodes("partyName");

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

            foreach (XmlNode item in partyNameNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        partyNameIDRef = item.Attributes["id"].Name;
                        PartyName ob = PartyName();
                        IDManager.SetID(partyNameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        partyNameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        partyName = new PartyName(item);
                    }
                }
            }


            XmlNodeList classificationNodeList = xmlNode.SelectNodes("classification");

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


            XmlNodeList creditRatingNodeList = xmlNode.SelectNodes("creditRating");

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


            XmlNodeList countryNodeList = xmlNode.SelectNodes("country");

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

            foreach (XmlNode item in countryNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        countryIDRef = item.Attributes["id"].Name;
                        CountryCode ob = CountryCode();
                        IDManager.SetID(countryIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        countryIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        country = new CountryCode(item);
                    }
                }
            }


            XmlNodeList jurisdictionNodeList = xmlNode.SelectNodes("jurisdiction");

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


            XmlNodeList organizationTypeNodeList = xmlNode.SelectNodes("organizationType");

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

            foreach (XmlNode item in organizationTypeNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        organizationTypeIDRef = item.Attributes["id"].Name;
                        OrganizationType ob = OrganizationType();
                        IDManager.SetID(organizationTypeIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        organizationTypeIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        organizationType = new OrganizationType(item);
                    }
                }
            }


            XmlNodeList contactInfoNodeList = xmlNode.SelectNodes("contactInfo");

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

            foreach (XmlNode item in contactInfoNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        contactInfoIDRef = item.Attributes["id"].Name;
                        ContactInformation ob = ContactInformation();
                        IDManager.SetID(contactInfoIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        contactInfoIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        contactInfo = new ContactInformation(item);
                    }
                }
            }


            XmlNodeList businessUnitNodeList = xmlNode.SelectNodes("businessUnit");

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


            XmlNodeList personNodeList = xmlNode.SelectNodes("person");

            foreach (XmlNode item in personNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        personIDRef = item.Attributes["id"].Name;
                        List <Person> ob = new List <Person>();
                        ob.Add(new Person(item));
                        IDManager.SetID(personIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        personIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        person.Add(new Person(item));
                    }
                }
            }
        }
Ejemplo n.º 12
0
        public Person(XmlNode xmlNode)
        {
            XmlNode honorificNode = xmlNode.SelectSingleNode("honorific");

            if (honorificNode != null)
            {
                if (honorificNode.Attributes["href"] != null || honorificNode.Attributes["id"] != null)
                {
                    if (honorificNode.Attributes["id"] != null)
                    {
                        honorificIDRef_ = honorificNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(honorificNode);
                        IDManager.SetID(honorificIDRef_, ob);
                    }
                    else if (honorificNode.Attributes["href"] != null)
                    {
                        honorificIDRef_ = honorificNode.Attributes["href"].Value;
                    }
                    else
                    {
                        honorific_ = new XsdTypeNormalizedString(honorificNode);
                    }
                }
                else
                {
                    honorific_ = new XsdTypeNormalizedString(honorificNode);
                }
            }


            XmlNode firstNameNode = xmlNode.SelectSingleNode("firstName");

            if (firstNameNode != null)
            {
                if (firstNameNode.Attributes["href"] != null || firstNameNode.Attributes["id"] != null)
                {
                    if (firstNameNode.Attributes["id"] != null)
                    {
                        firstNameIDRef_ = firstNameNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(firstNameNode);
                        IDManager.SetID(firstNameIDRef_, ob);
                    }
                    else if (firstNameNode.Attributes["href"] != null)
                    {
                        firstNameIDRef_ = firstNameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        firstName_ = new XsdTypeNormalizedString(firstNameNode);
                    }
                }
                else
                {
                    firstName_ = new XsdTypeNormalizedString(firstNameNode);
                }
            }


            XmlNodeList middleNameNodeList = xmlNode.SelectNodes("middleName");

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


            XmlNodeList initialNodeList = xmlNode.SelectNodes("initial");

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


            XmlNode surnameNode = xmlNode.SelectSingleNode("surname");

            if (surnameNode != null)
            {
                if (surnameNode.Attributes["href"] != null || surnameNode.Attributes["id"] != null)
                {
                    if (surnameNode.Attributes["id"] != null)
                    {
                        surnameIDRef_ = surnameNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(surnameNode);
                        IDManager.SetID(surnameIDRef_, ob);
                    }
                    else if (surnameNode.Attributes["href"] != null)
                    {
                        surnameIDRef_ = surnameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        surname_ = new XsdTypeNormalizedString(surnameNode);
                    }
                }
                else
                {
                    surname_ = new XsdTypeNormalizedString(surnameNode);
                }
            }


            XmlNode suffixNode = xmlNode.SelectSingleNode("suffix");

            if (suffixNode != null)
            {
                if (suffixNode.Attributes["href"] != null || suffixNode.Attributes["id"] != null)
                {
                    if (suffixNode.Attributes["id"] != null)
                    {
                        suffixIDRef_ = suffixNode.Attributes["id"].Value;
                        XsdTypeNormalizedString ob = new XsdTypeNormalizedString(suffixNode);
                        IDManager.SetID(suffixIDRef_, ob);
                    }
                    else if (suffixNode.Attributes["href"] != null)
                    {
                        suffixIDRef_ = suffixNode.Attributes["href"].Value;
                    }
                    else
                    {
                        suffix_ = new XsdTypeNormalizedString(suffixNode);
                    }
                }
                else
                {
                    suffix_ = new XsdTypeNormalizedString(suffixNode);
                }
            }


            XmlNodeList personIdNodeList = xmlNode.SelectNodes("personId");

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


            XmlNode businessUnitReferenceNode = xmlNode.SelectSingleNode("businessUnitReference");

            if (businessUnitReferenceNode != null)
            {
                if (businessUnitReferenceNode.Attributes["href"] != null || businessUnitReferenceNode.Attributes["id"] != null)
                {
                    if (businessUnitReferenceNode.Attributes["id"] != null)
                    {
                        businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["id"].Value;
                        BusinessUnitReference ob = new BusinessUnitReference(businessUnitReferenceNode);
                        IDManager.SetID(businessUnitReferenceIDRef_, ob);
                    }
                    else if (businessUnitReferenceNode.Attributes["href"] != null)
                    {
                        businessUnitReferenceIDRef_ = businessUnitReferenceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
                    }
                }
                else
                {
                    businessUnitReference_ = new BusinessUnitReference(businessUnitReferenceNode);
                }
            }


            XmlNode contactInfoNode = xmlNode.SelectSingleNode("contactInfo");

            if (contactInfoNode != null)
            {
                if (contactInfoNode.Attributes["href"] != null || contactInfoNode.Attributes["id"] != null)
                {
                    if (contactInfoNode.Attributes["id"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["id"].Value;
                        ContactInformation ob = new ContactInformation(contactInfoNode);
                        IDManager.SetID(contactInfoIDRef_, ob);
                    }
                    else if (contactInfoNode.Attributes["href"] != null)
                    {
                        contactInfoIDRef_ = contactInfoNode.Attributes["href"].Value;
                    }
                    else
                    {
                        contactInfo_ = new ContactInformation(contactInfoNode);
                    }
                }
                else
                {
                    contactInfo_ = new ContactInformation(contactInfoNode);
                }
            }


            XmlNode countryNode = xmlNode.SelectSingleNode("country");

            if (countryNode != null)
            {
                if (countryNode.Attributes["href"] != null || countryNode.Attributes["id"] != null)
                {
                    if (countryNode.Attributes["id"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["id"].Value;
                        CountryCode ob = new CountryCode(countryNode);
                        IDManager.SetID(countryIDRef_, ob);
                    }
                    else if (countryNode.Attributes["href"] != null)
                    {
                        countryIDRef_ = countryNode.Attributes["href"].Value;
                    }
                    else
                    {
                        country_ = new CountryCode(countryNode);
                    }
                }
                else
                {
                    country_ = new CountryCode(countryNode);
                }
            }
        }