Strange problem,

I used to work on MSXML.dll and now i wanted to switch on MSXML3.dll, i have changed my code variables easily by placing MSXML2 namespace everywhere and using Document2Ptr etc.

But this time it doesnt loading all kinds of XML , it only load few ones while on other it just gives faliure in loading. If i use MSXML then all xml file can be load easily... I tired of seraching my problem but couldnt found yet...

here is the code

MSXML2::IXMLDOMDocument2Ptr xml_Document;

variant_t vResult;

xml_Document=NULL;

CoInitialize(NULL); //Com initialization for DOM

HRESULT hr = xml_Document.CreateInstance(MSXML2::CLSID_DOMDocument);


if (FAILED(hr))
{
_com_error er(hr);
return XFAIL;
}

// xml_Document->async=false;
// xml_Document->validateOnParse= true;
//Load the Input XML file
_bstr_t bs=str_v_XmlFile.c_str();
vResult = xml_Document->load(bs);

same above code if i use with old version by changing the MSXML2::IXMLDOMDocument2Ptr xml_Document; into
MSXML::IXMLDOMDocumentPtr xml_Document;

Then everything will be work perfectly.
why is that?

thanks in advance
[1264 byte] By [Wolvorine] at [2007-11-19 13:40:46]