title: Assign entire file to a var as a string using jquery
body: <p>I'm trying to assign the contents of an xml file to a var, like so:</p>
  
  <pre><code>var testing = $.load('xx.xml');
  $('#display').text(testing);
  </code></pre>
  
  <p>but it's not working. I tried the ".load" function as suggested in:</p>
  
  <p><a href="https://stackoverflow.com/questions/3875833/how-to-assign-file-contents-into-a-javascript-var">How to assign file contents into a Javascript var</a> </p>
  
  <p>and I had a look at the page they suggest form the jquery website, but I can't find something specific to assigning the contents of the .xml file to the var as a string.</p>
  
  <p>I appreciate this is probably very obvious &amp; I am arguably being lazy, but I have been trying random things for a while &amp; cannot figure this out.</p>
  
  <p>Thanks</p>
  
  <p>EDIT! I was loading up the contents inside the load function, i didn't mean this, it's now edited.</p>