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
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