加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 无法使用loadxml加载“@”符号

发布时间:2020-12-16 07:27:29 所属栏目:百科 来源:网络整理
导读:我试图执行以下行 VARIANT_BOOL vBoolTestConnection;vBoolTestConnection=m_spXMLDom-loadXML(bstrInput.m_str); bstrInput具有以下XML规范.对于指定的XML,loadXML返回false. bstrInput在密码标记中有’@’.如果我用任何其他密码字符替换@符号,Load XML工作
我试图执行以下行

VARIANT_BOOL vBoolTestConnection;

vBoolTestConnection=m_spXMLDom->loadXML(bstrInput.m_str);

bstrInput具有以下XML规范.对于指定的XML,loadXML返回false. bstrInput在密码标记中有’@’.如果我用任何其他密码字符替换@符号,Load XML工作正常.你能帮我找到解决方案吗?

"<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
 ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
 ENC="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-
 ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-
 ENV:Body><CheckValidUser 
 xmlns="http://systemsys"><UserName>HGDXJHSAD</UserName><Password>&</Password></CheckValidUs
er></SOAP-ENV:Body></SOAP-ENV:Envelope>"

解决方法

BSTR通常是UTF-16.您发布的XML字符串声称它使用的是UTF-8编码.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读