title: Parsing XML data in Zillow and other API websites
body: <p>I have the code below working to pull data from a url string from zillow.com (as an example).  The zws-id isn't pasted in the url string due to privacy and security reasons but the page returns all api xml data for the state, city, and neighborhood properly.  The question would be how to pull a specific piece of data rather than ALL data.</p>
  
  <pre><code>&lt;?php
  $url = "http://www.zillow.com/webservice/GetDemographics.htm?zws-id=&lt;my_api_id&gt;&amp;state=WA&amp;city=Seattle&amp;neighborhood=Ballard";
  echo json_encode(simplexml_load_string(file_get_contents($url)));
  ?&gt;
  </code></pre>
  
  <p>This returns a page full of data and is obviously jumbled because it hasn't been parsed or organized in any way.</p>
  
  <p>One tiny excerpt of what is returned:  <code>"state":"Washington","city":"Seattle","neighborhood":"Ballard","latitude":"47.668328","longitude":"-122.384536",...</code></p>
  
  <p>How would I parse this and get what I need?  If I wanted the latitude only how could I use <code>$.parseJSON(data)</code> or the proper syntax to pull that specific item (latitude)?</p>
  
  <p>Of course I know that's WAY off... but I'm brand new at API, xml, json working together and I don't know if there is a standard way to do this or if it is specific to the company I'm using the API with.</p>
  
  <p>Zillow.com offers info such as "Sample API Output" just like a few other sites I've seen but how would I make use of this info?  Is it beneficial because it shows the labels of what each item would be called?  <a href="http://www.zillow.com/howto/api/GetDemographics.htm" rel="nofollow">http://www.zillow.com/howto/api/GetDemographics.htm</a></p>
  
  <p>Just a simple jump start would help a ton.  Thank you!</p>