Esempio n. 1
0
 public void LoadXML(XmlElement elem)
 {
     ID = int.Parse(elem.GetAttribute("id"));
     foreach (XmlElement e in elem.ChildNodes)
     {
         if (e.Name.Equals("attribute"))
         {
             Attributes.Add(Attribute.FromXml(e));
         }
         else if (e.Name.Equals("component"))
         {
             Components.Add(Component.FromXml(e));
         }
         else if (e.Name.Equals("node"))
         {
             Children.Add(Node.FromXml(e));
         }
     }
 }