Solved

Loading local Xml file into a data island

Posted on 2001-07-05
11
293 Views
Last Modified: 2006-11-17
In IE5, is it possible to load an .xml file present on the user's local disk.  I tried the following

A.  var xmlDoc;
    xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    xmlDoc.load("file://c:/xyz.xml");

    I get Error:Access is denied.

B.  Declaring a data island within the HTML body
    <XML ID="xmlData" SRC="file://c:/xyz.xml"></XML>

    ... nothing happens.  If SRC points to an xml
    file on the web server everything is fine.

Can anybody help?

Thanks,
-VJ
0
Comment
Question by:vbrnair
  • 4
  • 3
  • 2
  • +1
11 Comments
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6256237
hi vj

I think this is a permission issue. the browser tries to open the file as the internet user.
you'll have to set appropriate permissions.

hope this helps
MicOfLZ
0
 
LVL 14

Expert Comment

by:avner
ID: 6256567
There shouldn't be a problem , try to do with out the "file://"  thing , just put it in one direcotry , then on the same directory create a test page that would have something :
<XML ID="xmlData" SRC="file.xml"/>

The "file://"  is acts differently in different sub-versions of IE , this is why I wouldn't suggest using it in a code.

0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6258851
I'm pretty sure that you do not have access to XML files on a users local disk...if you would it would indeed be a serious security hazard....

Max.
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6259422
hi avner

if I'm not completely wrong now, this one:

<XML ID="xmlData" SRC="file.xml"/>

loads the file from the web server rather than from the clients hard disk.
by the way, my first comment is rubbish. I think that DreamMaster is right by reviewing the question.

Cheers
MicOfLZ
0
 
LVL 14

Expert Comment

by:avner
ID: 6259484
MicOfLZ and DreamMaster ,

There is a simple question here :
I started by basically thinking that when "vbrnair" say he tried this :
xmlDoc.load("file://c:/xyz.xml");

He tried this on his computer (when he is both server and client).

What you are suggesting is that he was trying to load this from a distanced client.

If the second option is the right one , then obviously it's a permission problem.

avner.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 19

Accepted Solution

by:
DreamMaster earned 50 total points
ID: 6259519
He says "on the user's local disk" not "on my own local disk"

Max.
0
 
LVL 14

Expert Comment

by:avner
ID: 6259564
DreamMaster ,

You are 100% correct , and there for we are back to  your first comment "Security reason" , and that is the correct answer.


vbrnair, forgive me if I managed to confuse you , DeamMaster has answerd the only possible answer and is well deserved the points.

avner.

0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6259575
LOL.... :-)

Max.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6867159
Finalized by EE Moderator
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 6867393
Thanks Moondancer.. :)

Max.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6867919
Happy to help, always sorry to see abandoned questions when help was requested and given.
Moondancer - EE Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unattended XML settings 4 99
XSL-FO - show results in 2 columns 5 28
C# SQL BULK INSERT CLASS 5 46
any soltion create a connection to import XML file from website 4 38
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now