c#如何增加多个XML结点,例如 <abc> <cdb>ddda </cdb> <ddd>ddd </ddd> </abc>

日期:2013-06-03 09:26:23 人气:2

c#如何增加多个XML结点,例如 <abc> <cdb>ddda </cdb> <ddd>ddd </ddd> </abc>

XmlDocument document = new XmlDocument();XmlElement abc = document.CreateElement("abc");XmlElement cdb = document.CreateElement("cdb");cdb.InnerText = "ddda";abc.AppendChild(cdb);XmlElement ddd = document.CreateElement("
    A+
热门评论