摘要: 1 using (var sw = new StringWriter()) 2 { 3 var xtw = new XmlTextWriter(sw); 4 //根节点 5 xtw.WriteStartElement("Test"); 6 //内容 7 xtw.WriteAttributeString("Name", "内容"); 8 xtw.WriteEndElement(); 9 string strInString = sw.ToString();10 } 1 string strInString = ""; 阅读全文
posted @ 2013-02-01 12:39 DR19 阅读(312) 评论(0) 推荐(0) 编辑