Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Bizarre behavior from DOMDocument.load() using MSXML 4

From: willgoogle@---.--- (---- --------)
To: NULL
Date: 6/24/2003 9:35:00 PM
I'm sure there is a good explanation for what I'm seeing but I haven't
been able to come up with it.  Allow me to present the scenario:

I am using Visual C++ 6.0.  A unit test I have written tests the
scenario in which the config file does not exist.  I do this by
removing the config file, then asking an object to initialize which
uses the following code to load the config file.

pDomDocument.CreateInstance(__uuidof(DOMDocument));
VARIANT_BOOL vResult = pDomDocument->load(_bstr_t("config.xml"));

Obviously it should fail to find the config file.  When stepping
though the code in the debugger, however, it appears to be finding it!
 I assure all that I have double and triple checked that, at the point
load was called, the current path was what I expected it to be and
that the file was indeed deleted.

If I use ".\\config.xml" then everything seems to work as I would
expect in the case where I am debugging.  The tests where the load
method should fail, fail and the tests where the load method should
work, work.

When I actually deploy the application which uses the code
".\\config.xml" fails to load but "config.xml" succeeds!

<rant>The documentation claims that if the parameter to load is a bstr
that it is interpreted as a URL to the xml file to load.  Of course
the same document goes on to show strings such as
"C:\\temp\\books.xml" (clearly not a valid URL) being passed to the
method.  I have tried using real URLs for files on the file system but
had absolutely no luck getting things to load.  I presume this to mean
that the method doesn't support the protocol "file".</rant>

I would be grateful if anyone out there could disprove my sanity by
pointing out what I might be doing wrong.


	Thanks,
	Will


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent