using System.Collections.Generic; using System.Xml.Linq; namespace Cosmobox.Def { public partial class DrawNode : Define { public string NodeName { get; set; } public List Children { get; set; } = []; public override bool Init(XElement xmlDef) { base.Init(xmlDef); NodeName = xmlDef.Element("NodeName")?.Value; foreach (var childNode in xmlDef.Elements("DrawNode")) { DrawNode child = new DrawNode(); child.Init(childNode); Children.Add(child); } return true; } } }