Try this:
public string GetConnectionString(string
{
XmlDocument doc = new XmlDocument();
doc.Load(fileName);
XmlNode connectNode = doc.SelectSingleNode("//Co
if (connectNode != null)
return connectNode.InnerText;
return "";
}
Sample usage:
string connectString = GetConnectionString(@"c:\t
Bob
Main Topics
Browse All Topics





by: steelheart38Posted on 2005-12-13 at 03:22:43ID: 15473010
which constring would you like to retrieve?
you have to constring both of equal level in the hierarchy (as childnodes of <tools>) and no attribute to differentiate them (aside from the text inside)
if you do have control over the xml structure, it could be easier to retrieve them with a clearer structure