此片段<!--Please don't delete this-->
是我的xml文件的一部分。運行此方法後,生成的xml文件不再包含此片段<!--Please don't delete this-->
。爲什麼是這樣?處理XML文件會刪除註釋
這裏是我的方法:
XmlSerializer serializer = new XmlSerializer(typeof(Settings));
TextWriter writer = new StreamWriter(path);
serializer.Serialize(writer, settings);
writer.Close();
任何特定語言? XML庫? – 2010-05-09 08:37:12