8 Replies - 3996 Views - Last Post: 09 September 2011 - 07:04 AM

#1 whocares?  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 10
  • Joined: 08-September 11

question: how to read local xml file

Posted 08 September 2011 - 07:59 PM

hi experts. if its possible to read xml files locally from an html page using javascript without using any local server? tia. ^^
Is This A Good Question/Topic? 0
  • +

Replies To: question: how to read local xml file

#2 whocares?  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 10
  • Joined: 08-September 11

Re: question: how to read local xml file

Posted 08 September 2011 - 08:30 PM

right now i am able to load xml using jquery .ajax function but it only loads xml files from server. what i need to do is to load xml from local file system. when i try to do it i get an error from chrome..
XMLHttpRequest cannot load file:///C:/Simplified.xml. Cross origin requests are only supported for HTTP.

Was This Post Helpful? 0
  • +
  • -

#3 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3515
  • View blog
  • Posts: 10,143
  • Joined: 08-June 10

Re: question: how to read local xml file

Posted 08 September 2011 - 10:02 PM

Javascript per design is not allowed to access the local file system. thus chances are slim that there is a way. (otherwise a malicious website could easily read out your personal files)
Was This Post Helpful? 1
  • +
  • -

#4 whocares?  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 10
  • Joined: 08-September 11

Re: question: how to read local xml file

Posted 08 September 2011 - 10:15 PM

oh.. i've read that.. hmm is there anything i can do to accomplish this task?
Was This Post Helpful? 0
  • +
  • -

#5 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3515
  • View blog
  • Posts: 10,143
  • Joined: 08-June 10

Re: question: how to read local xml file

Posted 08 September 2011 - 10:26 PM

not that I know of.
Was This Post Helpful? 0
  • +
  • -

#6 whocares?  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 10
  • Joined: 08-September 11

Re: question: how to read local xml file

Posted 08 September 2011 - 10:34 PM

so this is only possible server-side?
Was This Post Helpful? 0
  • +
  • -

#7 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3515
  • View blog
  • Posts: 10,143
  • Joined: 08-June 10

Re: question: how to read local xml file

Posted 08 September 2011 - 10:46 PM

to the best of my knowledge, yes.
Was This Post Helpful? 0
  • +
  • -

#8 whocares?  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 10
  • Joined: 08-September 11

Re: question: how to read local xml file

Posted 08 September 2011 - 11:53 PM

oh.. well thanks for the info
Was This Post Helpful? 0
  • +
  • -

#9 Tayacan  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 145
  • View blog
  • Posts: 275
  • Joined: 18-January 11

Re: question: how to read local xml file

Posted 09 September 2011 - 07:04 AM

Now, I don't know what you're trying to accomplice, so this may be completely useless to you... But wouldn't it be possible to create a script that uploads the file to your server, reads it and does whatever it is you want, and then perhaps deletes it from the server afterwards?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1