title: parsing a reponse from a XMLHttpRequest
body: <p>I'm struggling with how to parse a response from an XMLHttpRequest. The response is in json format:</p>
  
  <pre><code>http://flickr.com/services/rest/?method=flickr.photos.search&amp;api_key=75564008a468bf8a284dc94bbd176dd8&amp;tags=paris&amp;format=json
  </code></pre>
  
  <p>to make sure it does indeed come in as such i tested it:</p>
  
  <pre><code>document.getElementById('info').innerHTML = this.responseText
  </code></pre>
  
  <p>which returns me a page with a long line of data written in json format. Could someone help me figure out the next steps in order to extract data from the response i.e. a list of all titles</p>
  
  <p>i did some research and came across this:</p>
  
  <pre><code>response = this.responseText ;
  var doc = new DOMParser().parseFromString(response, "text/xml");
  </code></pre>
  
  <p>what do i need to do next?
  (Note: i wish to do this manually i.e. without the help of jQuery or similar tools.)</p>
  
  <p><strong>[EDIT]</strong></p>
  
  <p>based on the suggestions below and on the <a href="http://www.flickr.com/services/api/response.json.html" rel="nofollow">Flickr page on that matter</a>, i have tried the following:</p>
  
  <pre><code>request.onreadystatechange = function()
  {
   ...
              if (this.responseXML != null)
              {
                  jsonFlickrApi(this.responseText) ;
  
                  function jsonFlickrApi(rsp){
  
                      for (var i=0; i&lt;rsp.photos.photo.length; i++){
  
                          var blog = rsp.photos.photo[i];
  
                          var div = document.createElement('div');
                          var txt = document.createTextNode(photo.owner);
  
                          div.appendChild(txt);
                          //document.body.appendChild(div);
                          document.getElementById('info').innerHTML.appendChild(div);
                      }
  ...
  }
  </code></pre>
  
  <p>this doesn't return anything visible yet.</p>
  
  <p><strong>[EDIT2]</strong></p>
  
  <p>further troubleshooting reveals:</p>
  
  <pre><code>rsp = this.responseText ;
  document.getElementById('info').innerHTML = rsp.stat ;
  </code></pre>
  
  <p>prints <code>undefined</code></p>