Esempio n. 1
0
        public Address(XmlNode xmlNode)
        {
            XmlNode streetAddressNode = xmlNode.SelectSingleNode("streetAddress");

            if (streetAddressNode != null)
            {
                if (streetAddressNode.Attributes["href"] != null || streetAddressNode.Attributes["id"] != null)
                {
                    if (streetAddressNode.Attributes["id"] != null)
                    {
                        streetAddressIDRef_ = streetAddressNode.Attributes["id"].Value;
                        StreetAddress ob = new StreetAddress(streetAddressNode);
                        IDManager.SetID(streetAddressIDRef_, ob);
                    }
                    else if (streetAddressNode.Attributes["href"] != null)
                    {
                        streetAddressIDRef_ = streetAddressNode.Attributes["href"].Value;
                    }
                    else
                    {
                        streetAddress_ = new StreetAddress(streetAddressNode);
                    }
                }
                else
                {
                    streetAddress_ = new StreetAddress(streetAddressNode);
                }
            }


            XmlNode cityNode = xmlNode.SelectSingleNode("city");

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


            XmlNode stateNode = xmlNode.SelectSingleNode("state");

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


            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 postalCodeNode = xmlNode.SelectSingleNode("postalCode");

            if (postalCodeNode != null)
            {
                if (postalCodeNode.Attributes["href"] != null || postalCodeNode.Attributes["id"] != null)
                {
                    if (postalCodeNode.Attributes["id"] != null)
                    {
                        postalCodeIDRef_ = postalCodeNode.Attributes["id"].Value;
                        XsdTypeString ob = new XsdTypeString(postalCodeNode);
                        IDManager.SetID(postalCodeIDRef_, ob);
                    }
                    else if (postalCodeNode.Attributes["href"] != null)
                    {
                        postalCodeIDRef_ = postalCodeNode.Attributes["href"].Value;
                    }
                    else
                    {
                        postalCode_ = new XsdTypeString(postalCodeNode);
                    }
                }
                else
                {
                    postalCode_ = new XsdTypeString(postalCodeNode);
                }
            }
        }
 public Address(XmlNode xmlNode)
 {
     XmlNode streetAddressNode = xmlNode.SelectSingleNode("streetAddress");
     
     if (streetAddressNode != null)
     {
         if (streetAddressNode.Attributes["href"] != null || streetAddressNode.Attributes["id"] != null) 
         {
             if (streetAddressNode.Attributes["id"] != null) 
             {
                 streetAddressIDRef_ = streetAddressNode.Attributes["id"].Value;
                 StreetAddress ob = new StreetAddress(streetAddressNode);
                 IDManager.SetID(streetAddressIDRef_, ob);
             }
             else if (streetAddressNode.Attributes["href"] != null)
             {
                 streetAddressIDRef_ = streetAddressNode.Attributes["href"].Value;
             }
             else
             {
                 streetAddress_ = new StreetAddress(streetAddressNode);
             }
         }
         else
         {
             streetAddress_ = new StreetAddress(streetAddressNode);
         }
     }
     
 
     XmlNode cityNode = xmlNode.SelectSingleNode("city");
     
     if (cityNode != null)
     {
         if (cityNode.Attributes["href"] != null || cityNode.Attributes["id"] != null) 
         {
             if (cityNode.Attributes["id"] != null) 
             {
                 cityIDRef_ = cityNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(cityNode);
                 IDManager.SetID(cityIDRef_, ob);
             }
             else if (cityNode.Attributes["href"] != null)
             {
                 cityIDRef_ = cityNode.Attributes["href"].Value;
             }
             else
             {
                 city_ = new XsdTypeString(cityNode);
             }
         }
         else
         {
             city_ = new XsdTypeString(cityNode);
         }
     }
     
 
     XmlNode stateNode = xmlNode.SelectSingleNode("state");
     
     if (stateNode != null)
     {
         if (stateNode.Attributes["href"] != null || stateNode.Attributes["id"] != null) 
         {
             if (stateNode.Attributes["id"] != null) 
             {
                 stateIDRef_ = stateNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(stateNode);
                 IDManager.SetID(stateIDRef_, ob);
             }
             else if (stateNode.Attributes["href"] != null)
             {
                 stateIDRef_ = stateNode.Attributes["href"].Value;
             }
             else
             {
                 state_ = new XsdTypeString(stateNode);
             }
         }
         else
         {
             state_ = new XsdTypeString(stateNode);
         }
     }
     
 
     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 postalCodeNode = xmlNode.SelectSingleNode("postalCode");
     
     if (postalCodeNode != null)
     {
         if (postalCodeNode.Attributes["href"] != null || postalCodeNode.Attributes["id"] != null) 
         {
             if (postalCodeNode.Attributes["id"] != null) 
             {
                 postalCodeIDRef_ = postalCodeNode.Attributes["id"].Value;
                 XsdTypeString ob = new XsdTypeString(postalCodeNode);
                 IDManager.SetID(postalCodeIDRef_, ob);
             }
             else if (postalCodeNode.Attributes["href"] != null)
             {
                 postalCodeIDRef_ = postalCodeNode.Attributes["href"].Value;
             }
             else
             {
                 postalCode_ = new XsdTypeString(postalCodeNode);
             }
         }
         else
         {
             postalCode_ = new XsdTypeString(postalCodeNode);
         }
     }
     
 
 }
 public Address(XmlNode xmlNode)
 {
     XmlNodeList streetAddressNodeList = xmlNode.SelectNodes("streetAddress");
     if (streetAddressNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in streetAddressNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 streetAddressIDRef = item.Attributes["id"].Name;
                 StreetAddress ob = StreetAddress();
                 IDManager.SetID(streetAddressIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 streetAddressIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 streetAddress = new StreetAddress(item);
             }
         }
     }
     
 
     XmlNodeList cityNodeList = xmlNode.SelectNodes("city");
     if (cityNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in cityNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 cityIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(cityIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 cityIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 city = new XsdTypeString(item);
             }
         }
     }
     
 
     XmlNodeList stateNodeList = xmlNode.SelectNodes("state");
     if (stateNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in stateNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 stateIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(stateIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 stateIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 state = new XsdTypeString(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 postalCodeNodeList = xmlNode.SelectNodes("postalCode");
     if (postalCodeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in postalCodeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 postalCodeIDRef = item.Attributes["id"].Name;
                 XsdTypeString ob = XsdTypeString();
                 IDManager.SetID(postalCodeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 postalCodeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 postalCode = new XsdTypeString(item);
             }
         }
     }
     
 
 }
        public Address(XmlNode xmlNode)
        {
            XmlNodeList streetAddressNodeList = xmlNode.SelectNodes("streetAddress");

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

            foreach (XmlNode item in streetAddressNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        streetAddressIDRef = item.Attributes["id"].Name;
                        StreetAddress ob = StreetAddress();
                        IDManager.SetID(streetAddressIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        streetAddressIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        streetAddress = new StreetAddress(item);
                    }
                }
            }


            XmlNodeList cityNodeList = xmlNode.SelectNodes("city");

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

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


            XmlNodeList stateNodeList = xmlNode.SelectNodes("state");

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

            foreach (XmlNode item in stateNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        stateIDRef = item.Attributes["id"].Name;
                        XsdTypeString ob = XsdTypeString();
                        IDManager.SetID(stateIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        stateIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        state = new XsdTypeString(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 postalCodeNodeList = xmlNode.SelectNodes("postalCode");

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

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