public Component _parseComponent(XElement ComponentNode) { Component component = new Component(); component.Name = ComponentNode.Attribute("name").Value.ToString(); foreach (XElement currentNode in ComponentNode.Elements()) { // Console.WriteLine("processing Property : " + currentNode.Name); if (currentNode.Name.LocalName.Trim() == "Property") { string name = currentNode.Attribute("name").Value; string type = currentNode.Attribute("type").Value; Property property = new Property(name,type); Console.WriteLine(".processing attribute : " + name + " " + type); Property p = new Property(name, type); component.addProperty(p); } } return component; }
public void addComponent(Component comp) { components.Add(comp); }