Esempio n. 1
0
        internal override void ParseXml(XmlElement xml)
        {
            base.ParseXml(xml);
            string height = xml.GetAttribute("Height");

            if (!string.IsNullOrEmpty(height))
            {
                double.TryParse(height, out mHeight);
            }
            foreach (XmlNode child in xml.ChildNodes)
            {
                string name = child.Name;
                if (string.Compare(name, "BaseCurve", true) == 0)
                {
                    BaseCurve = mDatabase.ParseXml <IfcBoundedCurve>(child as XmlElement);
                }
                else if (string.Compare(name, "Segments") == 0)
                {
                    foreach (XmlNode cn in child.ChildNodes)
                    {
                        IfcCurveSegment o = mDatabase.ParseXml <IfcCurveSegment>(cn as XmlElement);
                        if (o != null)
                        {
                            Segments.Add(o);
                        }
                    }
                }
                else if (string.Compare(name, "EndPoint", true) == 0)
                {
                    EndPoint = mDatabase.ParseXml <IfcCartesianPoint>(child as XmlElement);
                }
            }
        }
Esempio n. 2
0
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "BaseCurve", true) == 0)
         {
             BaseCurve = mDatabase.ParseXml <IfcBoundedCurve>(child as XmlElement);
         }
         else if (string.Compare(name, "Segments") == 0)
         {
             foreach (XmlNode cn in child.ChildNodes)
             {
                 IfcCurveSegment o = mDatabase.ParseXml <IfcCurveSegment>(cn as XmlElement);
                 if (o != null)
                 {
                     Segments.Add(o);
                 }
             }
         }
         else if (string.Compare(name, "EndPoint", true) == 0)
         {
             EndPoint = mDatabase.ParseXml <IfcCartesianPoint>(child as XmlElement);
         }
     }
 }