GeometryGym.Ifc.IfcPostalAddress.ParseXml C# (CSharp) Méthode

ParseXml() private méthode

private ParseXml ( XmlElement xml ) : void
xml System.Xml.XmlElement
Résultat void
        internal override void ParseXml(XmlElement xml)
        {
            base.ParseXml(xml);
            if (xml.HasAttribute("InternalLocation"))
                InternalLocation = xml.Attributes["InternalLocation"].Value;
            foreach (XmlNode child in xml.ChildNodes)
            {
                string name = child.Name;
                if (string.Compare(name, "AddressLines") == 0)
                {
                    List<string> lines = new List<string>(child.ChildNodes.Count);
                    foreach (XmlNode cn in child.ChildNodes)
                        lines.Add(cn.InnerText);
                    AddressLines = lines;
                }
            }
            if (xml.HasAttribute("PostalBox"))
                PostalBox = xml.Attributes["PostalBox"].Value;
            if (xml.HasAttribute("Town"))
                Town = xml.Attributes["Town"].Value;
            if (xml.HasAttribute("Region"))
                Region = xml.Attributes["Region"].Value;
            if (xml.HasAttribute("PostalCode"))
                PostalCode = xml.Attributes["PostalCode"].Value;
            if (xml.HasAttribute("Country"))
                Country = xml.Attributes["Country"].Value;
        }
IfcPostalAddress