Hexadecimal value 0x00 is a invalid character

后端 未结 6 1758
悲&欢浪女
悲&欢浪女 2020-12-17 08:06

I am generating an XML document from a StringBuilder, basically something like:

string.Format(\"{0}{1}         


        
6条回答
  •  清歌不尽
    2020-12-17 08:45

    To add to Sonz's answer above, following worked for us.

    //Instead of 
    XmlString.Replace("�", "[0x00]");
    // use this
    XmlString.Replace("\x00", "[0x00]");
    

提交回复
热议问题