求助啊 怎么把字符串添加到string.xml
1个回答
展开全部
XmlWriter.Create(Server.MapPath(@"XMLFile1.xml")); string xmlstr = "<?xml version=\"1.0\" encoding=\"gb2312\"?>" + "<PARTNUMBER FLAG=\"TOP\">TE3000000000" + "<CHILDPARTNUMBER>W200007440" + "<COUNT>66.0</COUNT>" + "<UNIT>每个</UNIT>" + "<KEYPART></KEYPART><MATERIALREPLACEMENTELEMENT></MATERIALREPLACEMENTELEMENT>" + "</CHILDPARTNUMBER></PARTNUMBER>"; StreamWriter sw = new StreamWriter(Server.MapPath(@"XMLFile1.xml"),false); sw.Write(xmlstr); sw.Close();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询