Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6782675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:46:18+00:00 2026-05-26T16:46:18+00:00

Hi I am trying to read an xml file from outside the web-app container,

  • 0

Hi I am trying to read an xml file from outside the web-app container, It works fine when the xml file is in a directory inside the web-app container but doesnt work when I try to access it from a directory location outside web-app.
I am actually writing the XML file successfully before I try to read it, in any appropriate location in the disk.
I tried paths like c:/xmls/my1.xml, /myprojhome/xmls/my1.xml but only /myprjhome/js/my1.xml works since js directory is inside web-ap.

I am just trying to access by hardcoding the path in the code right now, like
map.setDataURL(“/myprjhome/js/my1.xml”); – this works but others dont, they give data error – not able to find file

Its a windows system I am working on right now, do I need to set the url for the map in some other way? (for eg. using file.seperator)

I am Using Fusion Maps – a flash based map chart tool which accepts data in xml format, so I import a javascript file which is FusionMaps.js , and this has all the functions like setDataURL inside it. I am doing this in the javascript to render the chart :

          <script> 
var  map = new FusionMaps("/gra/swf/Maps/FCMap_World.swf", "Map1Id", "750", "400", "0", "0"); 
     map.SetDataURL(URL of the dataxml);
         </script>

The chart shows the map only if the URL is valid, else it shows invalid URL error, I tried to use the File protocol (File:///c:/cmls/mtxml.xml) but it doesnt work. Is it because of the Flash sandbox security model not allowing access to resources outside a domain of the swf file? since you can see that the swf file is located in some other path.. (that path is in web-app..)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:46:19+00:00Added an answer on May 26, 2026 at 4:46 pm

    Right, so after our conversation in the comments, we finally discover the cause of your problems.

    You are doing this in Javascript, so it is on the client side. The client machine cannot see an arbitrary path on your computer (can you imagine the implications if it could?)

    You have 2 options:

    1. Put the xml inside your webapp (you know this works)
    2. Write a server that will return xml from an arbitrary folder when executed.

    Would go with #1 unless you have very strong reasons for #2

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to read a xml file from the web and parse it
I am trying to read an XML-file from another server. However the the company
I have an xml file(from federal government's data.gov) which I'm trying to read with
I'm trying to read in some sample data from an XML file in a
I have a really simple XML file that I'm trying to read, but I
I'm trying to read xml file from vbs script. Xml is encoded in utf-8
I'm currently trying to READ XML file from the client machine where the user
I am currently trying to read from an xml file which records the jobs
I am trying to read the xml from a file and display them just
I'm trying to read a xml file (from facebook) into my page. I keep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.