public String GetSetting(String Name, String File_Name) { string Temp = ""; if (File.Exists(File_Name)) { string sName = ""; XmlTextReader reader = new XmlTextReader(File_Name); while (reader.Read()) { switch (reader.NodeType) { case XmlNodeType.Element: sName = reader.Name; break; case XmlNodeType.Text: if (sName == Name) { Temp = reader.Value; } break; } } reader.Close(); } else { //Error(File_Name + " was not found"); } return Temp; }
Zeron.XML zXML = new Zeron.XML(); zXML.GetSetting("ServerRoot",sFile);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)