public CommodityMetalBrand(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;
                        CommodityMetalBrandName ob = new CommodityMetalBrandName(nameNode);
                        IDManager.SetID(nameIDRef_, ob);
                    }
                    else if (nameNode.Attributes["href"] != null)
                    {
                        nameIDRef_ = nameNode.Attributes["href"].Value;
                    }
                    else
                    {
                        name_ = new CommodityMetalBrandName(nameNode);
                    }
                }
                else
                {
                    name_ = new CommodityMetalBrandName(nameNode);
                }
            }


            XmlNode brandManagerNode = xmlNode.SelectSingleNode("brandManager");

            if (brandManagerNode != null)
            {
                if (brandManagerNode.Attributes["href"] != null || brandManagerNode.Attributes["id"] != null)
                {
                    if (brandManagerNode.Attributes["id"] != null)
                    {
                        brandManagerIDRef_ = brandManagerNode.Attributes["id"].Value;
                        CommodityMetalBrandManager ob = new CommodityMetalBrandManager(brandManagerNode);
                        IDManager.SetID(brandManagerIDRef_, ob);
                    }
                    else if (brandManagerNode.Attributes["href"] != null)
                    {
                        brandManagerIDRef_ = brandManagerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        brandManager_ = new CommodityMetalBrandManager(brandManagerNode);
                    }
                }
                else
                {
                    brandManager_ = new CommodityMetalBrandManager(brandManagerNode);
                }
            }


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


            XmlNode producerNode = xmlNode.SelectSingleNode("producer");

            if (producerNode != null)
            {
                if (producerNode.Attributes["href"] != null || producerNode.Attributes["id"] != null)
                {
                    if (producerNode.Attributes["id"] != null)
                    {
                        producerIDRef_ = producerNode.Attributes["id"].Value;
                        CommodityMetalProducer ob = new CommodityMetalProducer(producerNode);
                        IDManager.SetID(producerIDRef_, ob);
                    }
                    else if (producerNode.Attributes["href"] != null)
                    {
                        producerIDRef_ = producerNode.Attributes["href"].Value;
                    }
                    else
                    {
                        producer_ = new CommodityMetalProducer(producerNode);
                    }
                }
                else
                {
                    producer_ = new CommodityMetalProducer(producerNode);
                }
            }
        }
 public CommodityMetalBrand(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;
                 CommodityMetalBrandName ob = CommodityMetalBrandName();
                 IDManager.SetID(nameIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 nameIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 name = new CommodityMetalBrandName(item);
             }
         }
     }
     
 
     XmlNodeList brandManagerNodeList = xmlNode.SelectNodes("brandManager");
     if (brandManagerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in brandManagerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 brandManagerIDRef = item.Attributes["id"].Name;
                 CommodityMetalBrandManager ob = CommodityMetalBrandManager();
                 IDManager.SetID(brandManagerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 brandManagerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 brandManager = new CommodityMetalBrandManager(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 producerNodeList = xmlNode.SelectNodes("producer");
     if (producerNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in producerNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 producerIDRef = item.Attributes["id"].Name;
                 CommodityMetalProducer ob = CommodityMetalProducer();
                 IDManager.SetID(producerIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 producerIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 producer = new CommodityMetalProducer(item);
             }
         }
     }
     
 
 }
 public CommodityMetalBrand(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;
                 CommodityMetalBrandName ob = new CommodityMetalBrandName(nameNode);
                 IDManager.SetID(nameIDRef_, ob);
             }
             else if (nameNode.Attributes["href"] != null)
             {
                 nameIDRef_ = nameNode.Attributes["href"].Value;
             }
             else
             {
                 name_ = new CommodityMetalBrandName(nameNode);
             }
         }
         else
         {
             name_ = new CommodityMetalBrandName(nameNode);
         }
     }
     
 
     XmlNode brandManagerNode = xmlNode.SelectSingleNode("brandManager");
     
     if (brandManagerNode != null)
     {
         if (brandManagerNode.Attributes["href"] != null || brandManagerNode.Attributes["id"] != null) 
         {
             if (brandManagerNode.Attributes["id"] != null) 
             {
                 brandManagerIDRef_ = brandManagerNode.Attributes["id"].Value;
                 CommodityMetalBrandManager ob = new CommodityMetalBrandManager(brandManagerNode);
                 IDManager.SetID(brandManagerIDRef_, ob);
             }
             else if (brandManagerNode.Attributes["href"] != null)
             {
                 brandManagerIDRef_ = brandManagerNode.Attributes["href"].Value;
             }
             else
             {
                 brandManager_ = new CommodityMetalBrandManager(brandManagerNode);
             }
         }
         else
         {
             brandManager_ = new CommodityMetalBrandManager(brandManagerNode);
         }
     }
     
 
     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);
         }
     }
     
 
     XmlNode producerNode = xmlNode.SelectSingleNode("producer");
     
     if (producerNode != null)
     {
         if (producerNode.Attributes["href"] != null || producerNode.Attributes["id"] != null) 
         {
             if (producerNode.Attributes["id"] != null) 
             {
                 producerIDRef_ = producerNode.Attributes["id"].Value;
                 CommodityMetalProducer ob = new CommodityMetalProducer(producerNode);
                 IDManager.SetID(producerIDRef_, ob);
             }
             else if (producerNode.Attributes["href"] != null)
             {
                 producerIDRef_ = producerNode.Attributes["href"].Value;
             }
             else
             {
                 producer_ = new CommodityMetalProducer(producerNode);
             }
         }
         else
         {
             producer_ = new CommodityMetalProducer(producerNode);
         }
     }
     
 
 }
        public CommodityMetalBrand(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;
                        CommodityMetalBrandName ob = CommodityMetalBrandName();
                        IDManager.SetID(nameIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        nameIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        name = new CommodityMetalBrandName(item);
                    }
                }
            }


            XmlNodeList brandManagerNodeList = xmlNode.SelectNodes("brandManager");

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

            foreach (XmlNode item in brandManagerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        brandManagerIDRef = item.Attributes["id"].Name;
                        CommodityMetalBrandManager ob = CommodityMetalBrandManager();
                        IDManager.SetID(brandManagerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        brandManagerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        brandManager = new CommodityMetalBrandManager(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 producerNodeList = xmlNode.SelectNodes("producer");

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

            foreach (XmlNode item in producerNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        producerIDRef = item.Attributes["id"].Name;
                        CommodityMetalProducer ob = CommodityMetalProducer();
                        IDManager.SetID(producerIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        producerIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        producer = new CommodityMetalProducer(item);
                    }
                }
            }
        }