GeometryGym.Ifc.IfcContext.ParseXml C# (CSharp) 메소드

ParseXml() 개인적인 메소드

private ParseXml ( XmlElement xml ) : void
xml XmlElement
리턴 void
		internal override void ParseXml(XmlElement xml)
		{
			base.ParseXml(xml);
			if (xml.HasAttribute("ObjectType"))
				ObjectType = xml.Attributes["ObjectType"].Value;
			if (xml.HasAttribute("LongName"))
				LongName = xml.Attributes["LongName"].Value;
			if (xml.HasAttribute("Phase"))
				Phase = xml.Attributes["Phase"].Value;
			foreach (XmlNode child in xml.ChildNodes)
			{
				string name = child.Name;
				if (string.Compare(name, "RepresentationContexts") == 0)
				{
					List<IfcRepresentationContext> repContexts = new List<IfcRepresentationContext>(child.ChildNodes.Count);
					foreach (XmlNode cn in child.ChildNodes)
					{
						IfcRepresentationContext rc = mDatabase.ParseXml<IfcRepresentationContext>(cn as XmlElement);
						if (rc != null)
							repContexts.Add(rc);
					}
					RepresentationContexts = repContexts;
				}
				else if (string.Compare(name, "UnitsInContext") == 0)
					UnitsInContext = mDatabase.ParseXml<IfcUnitAssignment>(child as XmlElement);
				else if (string.Compare(name, "IsDefinedBy") == 0)
				{
					List<IfcRelDefinesByProperties> defines = new List<IfcRelDefinesByProperties>(child.ChildNodes.Count);
					foreach (XmlNode cn in child.ChildNodes)
					{
						IfcRelDefinesByProperties rd = mDatabase.ParseXml<IfcRelDefinesByProperties>(cn as XmlElement);
						if (rd != null)
							defines.Add(rd);
					}
					IsDefinedBy = defines;
				}
				else if (string.Compare(name, "Declares") == 0)
				{
					List<IfcRelDeclares> declares = new List<IfcRelDeclares>(child.ChildNodes.Count);
					foreach (XmlNode cn in child.ChildNodes)
					{
						IfcRelDeclares rd = mDatabase.ParseXml<IfcRelDeclares>(cn as XmlElement);
						if (rd != null)
							declares.Add(rd);
					}
					Declares = declares;
				}
			}
			if (this as IfcProjectLibrary == null || mDatabase.mContext == null)
				mDatabase.mContext = this;
		}
		internal override void SetXML(XmlElement xml, BaseClassIfc host, HashSet<int> processed)