473,385 Members | 1,400 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,385 software developers and data experts.

MSXML load fails

Hi,

I have written an application in Microsoft Visual C++ (Visual Studio
6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it
throws an E_ACCESSDENIED (HRESULT = 0x80070005) exceptioon. I am not
sure why this is happenning. The sample code is:

IXMLDOMDocument2Ptr spXMLDocument;
spXMLDocument.CreateInstance(CLSID_DOMDocument40);

try
{
VARIANT vSourceFile;
VariantInit(&vSourceFile);

vSourceFile.vt = VT_BSTR;
vSourceFile.bstrVal = _bstr_t("C:\\Data.xml");

VARIANT_BOOL vbReturnCode = VARIANT_FALSE;
vbReturnCode = spXMLDocument->load(vSourceFile); //This is
the line that throws the exception.
}
catch(_comk_error &e)
{
AfxMessageBox(e.Description());
}

If I replace the load method with the loadXML method and pass the XML
as a string, it works fine.

I am trying to run this program on a machine with a French version of
WinXP. I tried to use MSXML 6.0 in stead of MSXML 4 and that seems to
have solved the problem. The thing is that we do not want to recompile
and re-release the program with MSXML 6. I am not sure why this fails
with MSXML 4.0.

I have a feeling that this has something to do with access rights but I
could be wrong.

Another problem on the same machine is that IE cannot display the XML
(even though it is well-formed). IE gives a message "XML page cannot be
displayed.......class not registered". I am not sure if these two
problems are related.

Any feedback would be appreciated.

Regards.

Jan 9 '06 #1
0 1762

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

Similar topics

0
by: Ashton | last post by:
Hello, I am fairly new to all this XML stuff. I have recently taken over some coding on a project that involves reading in xml documents and validating them based on some schema files. The...
7
by: Michael | last post by:
Hi, I have a problem parsing XML file using XSLT stylesheet by using : using System.Xml; using System.Xml.XPath; using System.Xml.Xsl; // load Xsl stylesheet XslTransform myXslTrans = new...
11
by: Lucky | last post by:
hi guys, i need to parse html data that i've got from "Inet" object in vb6. now i want to prase the html data. here i got 2 options. one is MSXML and other is MSHTML. i tried both of them but i...
0
by: upendra.desai | last post by:
Hi, I have written an application in Microsoft Visual C++ (Visual Studio 6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it throws an E_ACCESSDENIED (HRESULT = 0x80070005)...
0
by: upendra.desai | last post by:
Hi, I have written an application in Microsoft Visual C++ (Visual Studio 6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it throws an E_ACCESSDENIED (HRESULT = 0x80070005)...
3
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
5
by: Jeroen | last post by:
We're using MSXML to transform the XML document we have to an XHTML file using an XSLT. Now the problem is that the dotnet implementation we made does something subtly different from the...
4
by: mrjaxon | last post by:
I have a C# web application which leverages MSXML that I am trying to migrate to a 64 bit environment. Currently the application is built on the .NET 2.0 Framework and using MSXML 6 (though I had...
6
by: Anthony Jones | last post by:
People, Anyone else got an IIS7 server out there that they can test this little ASP file:- <% Set xml = Server.CreateObject("MSXML2.DOMDocument.3.0") xml.loadXML "<root />" Set xsl =...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.