title: How to simply display the xml output from YQL or have the JSON output to html
body: <p>So I've been working on a way to scrape the data from a page and display it (in roughly the same format as the source). I found YQL and I am finding it brilliant, except I can't figure out how to just display the whole output with nothing special (except the basic formatting)</p>
  
  <p>The YQL input code is: </p>
  
  <pre><code>select * from html where url="http://directory.vancouver.wsu.edu/anthropology" and xpath="//div[@id='facdir']"
  </code></pre>
  
  <p>using that it returns the JSON:</p>
  
  <pre><code>http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fdirectory.vancouver.wsu.edu%2Fanthropology%22%20and%20xpath%3D%22%2F%2Fdiv%5B%40id%3D'facdir'%5D%22&amp;format=json&amp;callback=anthropology
  </code></pre>
  
  <p>I've followed the yahoo tutorials, and created the news widget among other things, but not one tutorial covered the basic view (don't need the links either, just the paragraph setup).</p>
  
  <p><strong>Like this:</strong>  </p>
  
  <pre><code>Name
  Title
  Phone:(###)###-####
  Location: Building and Room #
  email@vancouver.wsu.edu
  </code></pre>
  
  <p>Here is what I had for output from <a href="http://christianheilmann.com" rel="nofollow">http://christianheilmann.com</a>, but it doesn't do anything (apparently none of her tutorials work, tried every one):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;
  &lt;b&gt;Copied:&lt;/b&gt;
  &lt;/p&gt;
  &lt;div&gt;
  &lt;script&gt;
  function anthropology (0) {
  // get the DIV with the ID $
  var info = document.getElementById('facdir');
  // add a class for styling
  info.className = 'js';
  // if it exists
  if(info){
  // get the info data returned from YQL
  var data = o.query.results.span;
  var link = info.getElementsByTagName('a')[0];
  link.innerHTML = '(see all info)';
  // to the main container DIV
  var out = document.createElement('span');
  out.className = 'info';
  info.insertBefore(out,link.parentNode);
  }
  }
  &lt;/script&gt;
  &lt;script src='http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fdirectory.vancouver.wsu.edu%2Fanthropology%22%20and%20xpath%3D%22%2F%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%2Fdiv%22&amp;format=json&amp;callback=anthropology'&gt;&lt;/script&gt;
  &lt;/div&gt;
  </code></pre>