Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Problem loading XML Document

Reply
Thread Tools

Problem loading XML Document

 
 
evillanueva
Guest
Posts: n/a
 
      11-16-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading a simple XHTML transitional document into aorg.w3c.dom.Document Ion Freeman Java 17 07-11-2009 10:17 PM
order of iframe loading with document loading ofir Javascript 0 12-03-2007 12:06 PM
Problem Loading xml document Tom Vukovich ASP .Net 1 08-09-2004 05:28 PM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments