XmlDocument doc = new XmlDocument();
string source = this.txtFWVL.Text;
byte[] bytes = Encoding.Default.GetBytes(source);
MemoryStream ms = new MemoryStream(bytes, 0, bytes.Length);
doc.Load(ms);
source:
<XtraSerializer version="1.0" encoding="UTF-8" >
<Search>
<Where>
<and>
<![CDATA[1]]>
</and>
<or>
<![CDATA["开始"]]>
</or>
</Where>
<Where>
<and>
<![CDATA[name]]>
</and>
<or>
<![CDATA[name=wnaglin]]>
</or>
</Where>
</Search>
</XtraSerializer>报错:给定编码中的字符无效。 行 8,位置 19。
string source = this.txtFWVL.Text;
byte[] bytes = Encoding.Default.GetBytes(source);
MemoryStream ms = new MemoryStream(bytes, 0, bytes.Length);
doc.Load(ms);
source:
<XtraSerializer version="1.0" encoding="UTF-8" >
<Search>
<Where>
<and>
<![CDATA[1]]>
</and>
<or>
<![CDATA["开始"]]>
</or>
</Where>
<Where>
<and>
<![CDATA[name]]>
</and>
<or>
<![CDATA[name=wnaglin]]>
</or>
</Where>
</Search>
</XtraSerializer>报错:给定编码中的字符无效。 行 8,位置 19。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货