public FuncTreeNode FindNodes(string xpath) { string[] paths = xpath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); if (paths.Length == 0) { return(this); } int index = 0; FuncTreeNode tmp = this; while (index < paths.Length) { tmp = tmp.FindNode(paths[index]); if (tmp != null) { index++; } else { break; } } return(tmp); }