Beispiel #1
0
    /** Finds an element of the specified name from the hierarchy under this element. */
    public ConfigElement FindElement(string name)
    {
        int i;

        for (i = 0; i < GetNumChildren(); i++)
        {
            ConfigElement child = GetChild(i);
            if (child.GetName() == name)
            {
                return(child);
            }
            ConfigElement descendant = child.FindElement(name);
            if (descendant != null)
            {
                return(descendant);
            }
        }
        return(null);
    }