public VyattaConfigNode GetChild(string Child) { if (Attribute == null) { foreach (var ChildNode in Children) { var Result = ChildNode.GetChild(Child); if (Result != null) { return(Result); } } } else { if (Child == Attribute.ToString()) { return(this); } else { string[] Split = Child.Split(new char[] { ':' }, 2); if (Split.Length != 2) { return(null); } if (Split[0] != Attribute.ToString()) { return(null); } foreach (var ChildNode in Children) { var Result = ChildNode.GetChild(Split[1]); if (Result != null) { return(Result); } } } } return(null); }