在 XmlDocument 中加载 xml 使用方法 xmlLoad in vb.net 时出错
Error when load xml in a XmlDocument used the method xmlLoad in vb.net
这是我的代码:
XmlDocument soapEnvelopeXML = new XmlDocument();
soapEnvelopeXML.LoadXML(xml);
变量字符串如下。但是当执行代码给出错误时:
捕获到 XmlException:解析 EntityName 时出错。第 1 行,位置 1439.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:QCI-INTERFACENET="http://qci.querycommerce.com:60801/interfacenet/">
<SOAP-ENV:Header>
<QCI-INTERFACENET:authentication>
<QCI-INTERFACENET:user>pu</QCI-INTERFACENET:user>
<QCI-INTERFACENET:password>p[u:4)yw</QCI-INTERFACENET:password>
</QCI-INTERFACENET:authentication>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<QCI-INTERFACENET:erpToQciProduct>
<QCI-INTERFACENET:products>
<QCI-INTERFACENET:list>
<QCI-INTERFACENET:item>
<QCI-INTERFACENET:product_id>000204001</QCI-INTERFACENET:product_id>
<QCI-INTERFACENET:active>1</QCI-INTERFACENET:active>
<QCI-INTERFACENET:allow_integration>1</QCI-INTERFACENET:allow_integration>
<QCI-INTERFACENET:barcode>000204001</QCI-INTERFACENET:barcode>
<QCI-INTERFACENET:reference>000204</QCI-INTERFACENET:reference>
<QCI-INTERFACENET:name>APONTADOR CIS - ELETRICO - AP-EL</QCI-INTERFACENET:name>
<QCI-INTERFACENET:description></QCI-INTERFACENET:description>
<QCI-INTERFACENET:short_description></QCI-INTERFACENET:short_description>
<QCI-INTERFACENET:annotation></QCI-INTERFACENET:annotation>
<QCI-INTERFACENET:price>269</QCI-INTERFACENET:price>
<QCI-INTERFACENET:special_price></QCI-INTERFACENET:special_price>
<QCI-INTERFACENET:manufacturer>COMÉRCIO E IMPORTAÇÃO SERTIC LTDA</QCI-INTERFACENET:manufacturer>
<QCI-INTERFACENET:brand></QCI-INTERFACENET:brand>
<QCI-INTERFACENET:model>ELETRICO - AP-EL</QCI-INTERFACENET:model>
<QCI-INTERFACENET:line>ESCRITA & CORRETIVOS</QCI-INTERFACENET:line>
<QCI-INTERFACENET:color>-</QCI-INTERFACENET:color>
<QCI-INTERFACENET:collection>-</QCI-INTERFACENET:collection>
<QCI-INTERFACENET:department></QCI-INTERFACENET:department>
<QCI-INTERFACENET:gross_weight>0</QCI-INTERFACENET:gross_weight>
<QCI-INTERFACENET:net_weight>0</QCI-INTERFACENET:net_weight>
<QCI-INTERFACENET:group>APONTADORES</QCI-INTERFACENET:group>
<QCI-INTERFACENET:height></QCI-INTERFACENET:height>
<QCI-INTERFACENET:width></QCI-INTERFACENET:width>
<QCI-INTERFACENET:length></QCI-INTERFACENET:length>
<QCI-INTERFACENET:size>-</QCI-INTERFACENET:size>
</QCI-INTERFACENET:item>
</QCI-INTERFACENET:list>
</QCI-INTERFACENET:products>
</QCI-INTERFACENET:erpToQciProduct>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我无法运行 xmlLoad 方法中给出错误的代码。
转义符号字符:
<QCI-INTERFACENET:line>ESCRITA & CORRETIVOS</QCI-INTERFACENET:line>
这是我的代码:
XmlDocument soapEnvelopeXML = new XmlDocument();
soapEnvelopeXML.LoadXML(xml);
变量字符串如下。但是当执行代码给出错误时: 捕获到 XmlException:解析 EntityName 时出错。第 1 行,位置 1439.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:QCI-INTERFACENET="http://qci.querycommerce.com:60801/interfacenet/">
<SOAP-ENV:Header>
<QCI-INTERFACENET:authentication>
<QCI-INTERFACENET:user>pu</QCI-INTERFACENET:user>
<QCI-INTERFACENET:password>p[u:4)yw</QCI-INTERFACENET:password>
</QCI-INTERFACENET:authentication>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<QCI-INTERFACENET:erpToQciProduct>
<QCI-INTERFACENET:products>
<QCI-INTERFACENET:list>
<QCI-INTERFACENET:item>
<QCI-INTERFACENET:product_id>000204001</QCI-INTERFACENET:product_id>
<QCI-INTERFACENET:active>1</QCI-INTERFACENET:active>
<QCI-INTERFACENET:allow_integration>1</QCI-INTERFACENET:allow_integration>
<QCI-INTERFACENET:barcode>000204001</QCI-INTERFACENET:barcode>
<QCI-INTERFACENET:reference>000204</QCI-INTERFACENET:reference>
<QCI-INTERFACENET:name>APONTADOR CIS - ELETRICO - AP-EL</QCI-INTERFACENET:name>
<QCI-INTERFACENET:description></QCI-INTERFACENET:description>
<QCI-INTERFACENET:short_description></QCI-INTERFACENET:short_description>
<QCI-INTERFACENET:annotation></QCI-INTERFACENET:annotation>
<QCI-INTERFACENET:price>269</QCI-INTERFACENET:price>
<QCI-INTERFACENET:special_price></QCI-INTERFACENET:special_price>
<QCI-INTERFACENET:manufacturer>COMÉRCIO E IMPORTAÇÃO SERTIC LTDA</QCI-INTERFACENET:manufacturer>
<QCI-INTERFACENET:brand></QCI-INTERFACENET:brand>
<QCI-INTERFACENET:model>ELETRICO - AP-EL</QCI-INTERFACENET:model>
<QCI-INTERFACENET:line>ESCRITA & CORRETIVOS</QCI-INTERFACENET:line>
<QCI-INTERFACENET:color>-</QCI-INTERFACENET:color>
<QCI-INTERFACENET:collection>-</QCI-INTERFACENET:collection>
<QCI-INTERFACENET:department></QCI-INTERFACENET:department>
<QCI-INTERFACENET:gross_weight>0</QCI-INTERFACENET:gross_weight>
<QCI-INTERFACENET:net_weight>0</QCI-INTERFACENET:net_weight>
<QCI-INTERFACENET:group>APONTADORES</QCI-INTERFACENET:group>
<QCI-INTERFACENET:height></QCI-INTERFACENET:height>
<QCI-INTERFACENET:width></QCI-INTERFACENET:width>
<QCI-INTERFACENET:length></QCI-INTERFACENET:length>
<QCI-INTERFACENET:size>-</QCI-INTERFACENET:size>
</QCI-INTERFACENET:item>
</QCI-INTERFACENET:list>
</QCI-INTERFACENET:products>
</QCI-INTERFACENET:erpToQciProduct>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我无法运行 xmlLoad 方法中给出错误的代码。
转义符号字符:
<QCI-INTERFACENET:line>ESCRITA & CORRETIVOS</QCI-INTERFACENET:line>