简体   繁体   English

使用C#从Unicode到原始格式到XML文件的转换

[英]Conversion from Unicode to Original format into XML file using c#

Please let me know how to write a unicode [ex: \] value into XML file as [?]escape symbol 请让我知道如何将Unicode [ex: \]值作为[?]转义符号写入XML文件中

I'm using UTF8 encoding and XMLWriter in C#, but it saves as "&#x1B ;" 我在C#中使用UTF8编码和XMLWriter,但将其另存为“”。 into XML 转换成XML

instead i want it to be written as "?" 相反,我希望将其写为“?” escape symbol into XML.. Is this possible? 将符号转义为XML。这可能吗?

Thanks 谢谢

Vinu 维努

The Unicode character x1B is not legal in XML 1.0; Unicode字符x1B在XML 1.0中不合法; it cannot be present in an XML document with or without escaping. 无论是否进行转义,它都不能存在于XML文档中。

In XML 1.1 it can be written as  在XML 1.1中,它可以写为 , but Microsoft's XML libraries do not support XML 1.1. ,但是Microsoft的XML库不支持XML 1.1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM