#endregion

给xml添加"<?xml version="1.0" encoding="gb2312"?> "格式:
XmlDocument xmldoc = new XmlDocument( ) ;
    XmlDeclaration   xn   =  xmldoc.CreateXmlDeclaration("1.0","gb2312",null);  
    xmldoc.AppendChild(xn);

最后创建好的xml文件:
<?xml version="1.0" encoding="gb2312"?>
<myinfo>
  <user>
   ***
  </user>
</myinfo>

相关文章:

  • 2022-01-25
  • 2022-12-23
  • 2021-10-29
  • 2022-01-30
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
猜你喜欢
  • 2021-08-25
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
相关资源
相似解决方案