Jump to content

load xml file from a URL


joecool2005

Recommended Posts

Its probably working fine. You just need to do something with the response. Try this:

var xmlSource=new ActiveXObject("Microsoft.XMLDOM")xmlSource.async=falsexmlSource.load("http://www.w3schools.com/xml/note.xml")document.write("<textarea style='height:90%;width:100%'>" + xmlSource.xml + "</textarea>");

Link to comment
Share on other sites

I've always tought that JavaScript has a security measure that forbids access to remote files. Try downloading the file and inserting it into the same folder the script is in.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...