0

What are the differences between an HTML http request and an XML http request. I get an access denied error for this

xmlhttp.open("GET","cd_catalog.xml",false); 

The xml file is in the same directory as the html file where that request is made.

3
  • Have you ruled out a problem on your server? I.e. do you get a 500 when you curl the XML but get a 200 when you curl the HTML? Commented Aug 10, 2011 at 1:32
  • It refers to that question: stackoverflow.com/questions/7004633/… Commented Aug 10, 2011 at 1:53
  • IE shows a blank page with an error message indicator. When I look at the error message it says access denied. Commented Aug 10, 2011 at 3:32

1 Answer 1

1

There is no difference in how XMLHttpRequest deals with XML vs HTML vs any other content-type of request.

If your server is not serving the XML at all you will see access denied.

If your server is redirecting *.xml requests to a different virtual domain or protocol, then you will see access denied because the redirect is cross-origin.

If your XML contains an external entity reference that is cross-domain, then that might cause problems as well.

Sign up to request clarification or add additional context in comments.

2 Comments

Are there specific settings needed for the server to allow xml?
@user823527, Without knowing anything about your server, it's impossible to say.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.