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

ParseXml() private méthode

private ParseXml ( XmlElement xml ) : void
xml XmlElement
Résultat void
        internal override void ParseXml(XmlElement xml)
        {
            base.ParseXml(xml);
            if (xml.HasAttribute("Name"))
                Name = xml.Attributes["Name"].Value;
            if (xml.HasAttribute("Description"))
                Description = xml.Attributes["Description"].Value;

            foreach (XmlNode child in xml.ChildNodes)
            {
                string name = child.Name;
                if (string.Compare(name, "Representations") == 0)
                {
                    List<IfcRepresentation> reps = new List<IfcRepresentation>(child.ChildNodes.Count);
                    foreach (XmlNode cn in child.ChildNodes)
                    {
                        IfcRepresentation r = mDatabase.ParseXml<IfcRepresentation>(cn as XmlElement);
                        if (r != null)
                            reps.Add(r);
                    }
                    Representations = reps;
                }
            }
        }