博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
把XML保存为ANSI编码
阅读量:4568 次
发布时间:2019-06-08

本文共 409 字,大约阅读时间需要 1 分钟。

XmlDocument xmlDoc = new XmlDocument();                xmlDoc.LoadXml(xmlText);            //plu.xml 编码是ANSI的。否则称上品名是乱码                XmlElement xeRoot = xmlDoc.DocumentElement;                XmlDeclaration xdl = xmlDoc.CreateXmlDeclaration("1.0", "gb2312", "yes");                xmlDoc.InsertBefore(xdl, xeRoot);                xmlDoc.Save(fileFullName);

 

转载于:https://www.cnblogs.com/runliuv/p/4043345.html

你可能感兴趣的文章
MS SQL 统计信息浅析上篇
查看>>
YourSQLDba版本升级总结
查看>>
Failure sending mail: The user or group name 'xxx\xxxx' is not recognized.Mail will not be resent
查看>>
分析函数改写自关联
查看>>
appium 数据参数化 登录模块
查看>>
php内置函数分析之array_fill_keys()
查看>>
git 从远程仓库获取所有分支
查看>>
从 Godaddy 转移域名到 Namesilo
查看>>
numpy
查看>>
django | 连接mysql数据库
查看>>
导入sql时报日期类型错误
查看>>
更改arch的默认终端
查看>>
labelme2coco问题:TypeError: Object of type 'int64' is not JSON serializable
查看>>
JDBC连接MySQL数据库的方法和实例
查看>>
初学python之感悟
查看>>
(转)Secondary NameNode的作用
查看>>
Unable to read TLD "META-INF/c.tld" from JAR file
查看>>
React开发
查看>>
权限管理
查看>>
Python字符串操作
查看>>