Problem loading XML Document

E

evillanueva

I've developed an application (in visual c++) which loads an XML
Document as a configuration file. I'm using DOM 4.0 in Windows 2000.
Sometimes when I make changes in the XML file and my application loads
it, loads an old version of the xml file. The behaviour is as if the
DomDocument object loaded a cached version of the Document. Has anyone
experiment this behaviour?. The piece of code where I load the file is
the following:

CoInitialize(NULL);

HRESULT hr = CoCreateInstance(__uuidof(DOMDocument40), NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IXMLDOMDocument),(void**)&(m_pXMLDoc));

if(SUCCEEDED(hr))
{

m_pXMLDoc->put_async(VARIANT_FALSE);
m_pXMLDoc->put_validateOnParse(VARIANT_FALSE);
m_pXMLDoc->put_resolveExternals(VARIANT_FALSE);

VARIANT vXMLName;

VariantInit(&vXMLName);

CString xmlPath = m_strExePath +_T("Install.xml");

vXMLName.vt= VT_BSTR;
vXMLName.bstrVal = xmlPath.AllocSysString();

VARIANT_BOOL status;


m_pXMLDoc->load(vXMLName,&status);

if(status == VARIANT_TRUE)
{
return TRUE;
}
else
{
return FALSE;
}
}

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top