xml|加载
下面的内容请放到Page_Load事件中,并需要导入命名空间using System.Xml ;
//创建Xml文档
XmlDocument doc1 = new XmlDocument();
//加载Xml结构
doc1.LoadXml("<ReturnString><Result/><TransactionID/><Description/></ReturnString>");
//为各个结点进行赋值
doc1.GetElementsByTagName("Result")[0].InnerText = "1";
doc1.GetElementsByTagName("TransactionID")[0].InnerText ="123";
doc1.GetElementsByTagName("Description")[0].InnerText = "这是一个测试";
//输出数据
Response.Write ( doc1.OuterXml);