title: d3.json, d3.xhr and cross-domain problems
body: <p>I made several tests today related to the way we can load json files with d3 because I was intrigued by this question: <a href="https://stackoverflow.com/questions/10622414/d3-json-works-but-getjson-fails">d3.json works but $.getJson fails</a>. However some of the tests that I made are a little bit tricky. </p>
  
  <pre><code>d3.xhr("http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&amp;query=select+*+where+%7B%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FRoger_Federer%3E+%3Fp+%3Fo+filter%28lang%28%3Fo%29+%3D+%27en%27%29%7D%0D%0A&amp;debug=on&amp;timeout=&amp;format=application%2Fsparql-results%2Bjson&amp;save=display&amp;fname=", function(data)
  console.log("success1"); 
  alert(data);
  });
  
  d3.json("http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&amp;query=select+*+where+%7B%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FRoger_Federer%3E+%3Fp+%3Fo+filter%28lang%28%3Fo%29+%3D+%27en%27%29%7D%0D%0A&amp;debug=on&amp;timeout=&amp;format=application%2Fsparql-results%2Bjson&amp;save=display&amp;fname=", function(data){              console.log("success2");
  alert(data);
  });
  
  
  d3.xhr("http://api.worldbank.org/countries/BRA/indicators/BX.KLT.DINV.CD.WD?per_page=10&amp;date=2007:2012&amp;format=json", function(data){
  console.log("success3");
  alert(data);
  })
  
  d3.json("http://api.worldbank.org/countries/BRA/indicators/BX.KLT.DINV.CD.WD?per_page=10&amp;date=2007:2012&amp;format=json", function(data){
  console.log("success4");
  alert(data);
  })
  </code></pre>
  
  <p>I know that the problem can be related to at least 2 reasons: MIME type and CORS, but I can't understand several other things: </p>
  
  <ol>
  <li><p>if the callback is always executed (even tough sometimes with the OK 200 which can also be an error as seen from jQuery's .ajax() and .getJSON() methods) why can I see the data in only one case (the first one) - the rest of the cases are always errors?</p></li>
  <li><p>what are the MIME types supported by d3.xhr method? </p></li>
  <li><p>if d3.json was just a nice wrapper for d3.xhr why does example 1 works and example 2 doesn't work...? I would like some clarification. I mostly use d3 with files from my server, but there are cases like this when I also have to use some external data, and it would be really nice to do this also with D3, not just with jQuery.</p></li>
  </ol>
  
  <p>I think there should be a list with all the MIME types accepted by these methods.</p>