描述:
i tested everyway i found, but all fails.
IXLMDOMDocument2Ptr pDoc;
// there is a xml file added to resource, e.g. test.xml (UTF-8) encoded
// check in IE, no problem.
// resource type HTML, and BINARY tried.
// ... create pDoc, find resource, loadresouce,
// create IStream on HGlobal, everything seems ok
// and i checked the dubug info, show xml content correctly,
// and setting the IStream to the beginning of IStream
// but...
pDoc->async = VARIANT_FALSE;
pDoc->load(_variant_t(pStream)); // FAILs, it complains that no top level element in xml.
// but, when i write the stream into a disk file,
// and load form file, it's OK !!!
// what's the problem?
解决方案1:
compound doc?
wa kao, kan bu dong, ban ni ding yi xia
use the CMarkup class. it's easy to use!!!
find it at the www.codeproject.com, come on guy, do it!!!
load xml file from resource? I think you have to release the xml resource to local file, then you can use loadXML() to reload it
您可能想查找下面的文章:
- HowtoregisterActiveXcontrols
- howtogetactivexiconromactivexcontrol/
- howto:改变IWebBrowser2的事件接收宿主?
- howto:显示office文件到界面?
- HowtoScrollaMFCActiveXcontrol
- HowtohandlescripterrorsasaWebBrowsercontrolhost
- howto怎样在线程中修改状态栏
- Howtoexpandthespecifiedkeyofregedit?如何自动展开Regedit指定路径的键?
- HowtoresolveDEPDataExecutionPreventionprobleminwinxpsp2
- Howtopausethesoundoutput