XmlDocument doc = new XmlDocument(); doc.Load(path); doc.Save(Console.Out); foreach (XmlNode node in doc.DocumentElement) { string word_name = node.Attributes[0].Value; string word_translation = node["name of node"].InnerText; }
XmlDocument doc = new XmlDocument(); using (StreamReader streamReader = new StreamReader(path_name, Encoding.UTF8)) { contents = streamReader.ReadToEnd(); } doc.LoadXml(contents);