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