为什么IE可以打开此xml,但是我的VC ++程序却无法打开? [英] why IE can open this xml,but my VC++ program cannot??
本文介绍了为什么IE可以打开此xml,但是我的VC ++程序却无法打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
带有控制字符的xml内容:
xml content with control characters:
<root>
<node command="">some info</node>
</root>
我的VC ++代码,与VC ++ 6.0编译了
my VC++ code,compiled with VC++ 6.0
#import "MSXML3.dll" named_guids
CoInitialize(NULL);
MSXML2::IXMLDOMDocumentPtr xmldoc = NULL;
HRESULT hr = xmldoc.CreateInstance(MSXML2::CLSID_DOMDocument);
VARIANT_BOOL success = xmldoc->load( CComVariant("c:\\test.xml") );
if (success == VARIANT_TRUE)
{
AfxMessageBox("load ok");
}
else
{
AfxMessageBox("load fail");
}
xmldoc = NULL;
CoUninitialize();
推荐答案
检查parseError
对象的成员会有所帮助.参见以下示例 [
Checking theparseError
object''s members would help. See this example[^].
:)
这篇关于为什么IE可以打开此xml,但是我的VC ++程序却无法打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文