473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem loading XML Document

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

Nov 23 '05 #1
0 915

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shock | last post by:
Hello everyone, I am having a problem with the program below. I have isolated the problem to the onclick event that is located throughout arrQuestions. The onclick event refers to a function...
3
by: MN | last post by:
Hello all - I was hoping I could appeal to the gurus out there as I've researched this issue and can't seem to get this Flash movie to load at all. Below is my javascript code that I use to...
3
by: Tony Lugg | last post by:
I have an application with a document management form. When users add documents to the form, I call the API function SHGetFileInfo to get the associated large and small icons for the file. These...
2
by: nick.taylor | last post by:
Hi, I've been trying for weeks to figure out this problem. I'm developing a simple Javascript app that loads an XML file from a server, parses the contents, and displays them. But I am...
2
by: darren | last post by:
I have a small Javascript problem with that mutch love web browser safari, I tested the code on all other browsers PC (Win) and Linux and IE on the mac and it seams to work ok, but for some reason...
2
by: billkirim | last post by:
i am using this code to preload my site: <script type="text/javascript"> document.write('<div id="loading"><br><br>The musicase is Loading...</div>'); window.onload=function(){ ...
1
by: agatha.life | last post by:
I did a javascript for the loading of images (I didn't want to have the images loaded in "on loading" because they are too many). The website is for a model and if you look at the codeof pages (...
2
by: jfaulky | last post by:
Hi all, I have a simply AJAX function that I pass a URL and it returns its contents to a <DIV id="mydivname"> area of my screen. All works fine when I manually enter:...
7
by: psybert | last post by:
Hello everyone, Long time lurker, first time poster. I'm a beginner coder, and I've taught myself everything with the help and expertise of users and websites like this one. I normally figure out...
6
by: Shigun | last post by:
On a website I am working on I am trying to load another page into a div on the the page the user does his work from. What I have works correctly in FireFox, but not in IE. I've rummaged Google for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.