I know jay, but you don't need to try-catch there, you need to if-else.

Anyways:
PHP Code: 
                foreach (XmlNode searchNode in list)
                {
                    return 
searchNode.SelectSingleNode(settingNode.Replace(" ""_")).InnerText;
                } 
Why start a loop when you have a return statement in the 1st iteration ?