static void Main(string[] args)
{
XmlDocument doc = new XmlDocument();
doc.Load("C:\\test.xml");
ip = doc.SelectSingleNode("Configuration/ServerIP").Attributes["value"].InnerText;
port = doc.SelectSingleNode("Configuration/CommPort").Attributes["value"].InnerText;
logging = doc.SelectSingleNode("Configuration/Logging").Attributes["value"].InnerText;
Console.WriteLine("{0}:{1}:{2}", ip, port, logging);
Console.ReadLine();
}
private static string ip;
private static string port;
private static string logging;
|