title: getJSON results in XML parse error?
body: <p>New to javascript and thought I would try retrieve some information from a database (and eventually graph it I hope!).</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
    &lt;html&gt;
     &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
        &lt;title&gt;Flot Examples&lt;/title&gt;
        &lt;link href="layout.css" rel="stylesheet" type="text/css"&gt;
        &lt;!--[if lte IE 8]&gt;&lt;script language="javascript" type="text/javascript" src="../excanvas.min.js"&gt;&lt;/script&gt;&lt;![endif]--&gt;
        &lt;script language="javascript" type="text/javascript" src="../jquery.js"&gt;&lt;/script&gt;
        &lt;script language="javascript" type="text/javascript" src="../jquery.flot.js"&gt;&lt;/script&gt;
     &lt;/head&gt;
        &lt;body&gt;
        &lt;h1&gt;Test Javascript:&lt;/h1&gt;
  
  
    &lt;script type="text/javascript"&gt;
    $(function () {
        $.get("http://localhost:8000/activity?starttime=13129788041&amp;endtime=0&amp;hostid=1", function(data) {
            $.each(data, function(i,item){
                document.write(i);
            });
        });
    });
    &lt;/script&gt;
  
     &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>
  
  <p>The line "http://localhost:8000/activity?starttime=13129788041&amp;endtime=0&amp;hostid=1" returns what I'm looking for if I type it in a browser window:</p>
  
  <p>{"1.313496422E9":[0.21000000000003638,448,12754,1.868579977195076]}</p>
  
  <p>But doesn't work in the javascript.</p>
  
  <p>If I look with httpfox there is an error</p>
  
  <p>application/xml (NS_ERROR_DOM_BAD_URI)</p>
  
  <p>But if I view the "contents" tab in httpfox I can actually see the data under  I require but there is an XML parse error.</p>
  
  <pre><code>&lt;?xml-stylesheet
    href="chrome://global/locale/intl.css" type="text/css"
    ?&gt;
    &lt;parsererror&gt;
    XML Parsing Error: not well-formed Location: chrome://browser/content/browser.xul Line Number 1, Column 1:
    &lt;sourcetext&gt;
    {"1.313496422E9":[0.21000000000003638,448,12754,1.868579977195076]} ^
    &lt;/sourcetext&gt;
    &lt;/parsererror&gt;
  </code></pre>
  
  <p>The NS_ERROR_DOM_BAD_URI seems to be about cross domain issues but I'm working locally on the actual server so should I be able to access the data? Also why is there an XML parse error when I can see the exact data I want in httpfox's "Content" tab?</p>
  
  <p>I'm probably doing something horrendously amateur but any help/thoughts/abuse would be welcome!</p>
  
  <p>Cheers,</p>
  
  <p>Rob.</p>