c# 创建,加载,修改XML文档
using System.Xml.Linq;
static void Main(string[] args) { XDocument xDocument = new XDocument(new XElement("mployess", //创建跟元素 new XElement("name", "a"),new XElement("name","b")));//创建元素 xDocument.Save("地址"); XDocument empole = XDocument.Load("地址");//加载xml 文档 可以保证修改 Console.WriteLine(empole); }
从此山高路远,纵马扬鞭。愿往后旅途,三冬暖,春不寒,天黑有灯,下雨有伞。此生尽兴,不负勇往。