Dictionary<string, string> infos = new Dictionary<string, string>(); XmlDocument doc = new XmlDocument(); doc.Load(xmlDir); foreach (XmlNode node in doc.DocumentElement.ChildNodes) { infos.Add(node.Name, node.InnerText); }