大家好,现在webservice返回的XML是<?xml version="1.0" encoding="utf-8"?>,不过客户那边希望的结果是<?xml version="1.0" encoding="gb2312"?>。搜索了很多地方也没有找到方法。请教大家有什么办法来解决吗。谢谢了
你不妨可以尝试一下方法:
XmlWriter w = XmlWriter.Create("C:\\x.xml", new XmlWriterSettings { Encoding = Encoding.GetEncoding("gb2312") });
w.WriteElementString("Test", "This is a test");
w.Close();
如果你有其它意见或私下交流,请直接发送maledong_work@foxmail.com;或者
If you do not have QQ, please
open the page and download it
and click the image to talk or leave message for me.
下载MSDN桌面工具(Vista,Win7)
下载Technet桌面小工具(Vista,Win7)
慈善点击,点击此处