title: Cross-Domain AJAX to Read XML
body: <p>Noobie here. I'm writing a client script that needs to read an XML file from another domain. I tried using JSONP. I get a 200 response but the client can't access the returned data for some reason. I get two errors:</p>
  
  <pre><code>Resource interpreted as Script but transferred with MIME type text/xml
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  </code></pre>
  
  <p>Here's the code (I've removed the XML url since it's confidential): </p>
  
  <pre><code>$(document).ready(function() {
    $.getJSON("urlOfFilecallback=?", function(data) {
    console.log(data)
   })
  });
  </code></pre>
  
  <p>When I try to render the data in the console I get:</p>
  
  <pre><code>ReferenceError: data is not defined
  </code></pre>
  
  <p>How can I fix this? Do I need to use a proxy?</p>