atisman Posted March 19, 2007 Share Posted March 19, 2007 Hi, this might sound a basic question but...Can the XML DOM object load an xml file in any arbitray URL? I have a Javascript that creates a DOM object and I'd like to use load function with a URL that indicates an XML file... For example, using Firefox......xmlDoc=document.implementation.createDocument("","",null);xmlDoc.load("http://www.w3schools.com/xml/xml_note.xml");...I'm running a WEBrick webserver in my local PC and running the script but it doesn't seem to work. But it can load any XML files in my local PC. Any explanation why this happens would be appreciated.Thank you. Link to comment Share on other sites More sharing options...
ashvini Posted March 26, 2007 Share Posted March 26, 2007 Hi, can you elaborate more what exactly what you want to do using DOM....??May I able to help you... than... Link to comment Share on other sites More sharing options...
boen_robot Posted March 26, 2007 Share Posted March 26, 2007 I think there was an equivalent topic about this in the JS forum, where jesh (I believe) answered what I was planning to say too: you can't fetch remote files with JavaScript. JavaScript has a security feature preventing it from reading and manipulating files from other domains. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now