title: Parsing the National Threat Level XML File with jQuery
body: <p>I'm trying to use jQuery to parse the DHS Threat Level that they have in their <a href="http://www.dhs.gov/dhspublic/getAdvisoryCondition" rel="nofollow noreferrer">XML file</a>, but I can't seem to get it to work. I'm very new with Javascript and non-presentational jQuery, so I'm probably missing something obvious.</p>
  
  <p>This is the XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; 
  &lt;THREAT_ADVISORY CONDITION="ELEVATED" /&gt; 
  </code></pre>
  
  <p>This is the Javascript I've written:</p>
  
  <pre><code>$(document).ready(function() {
      $.ajax({
          type     :  'GET',
          url      :  'http://www.dhs.gov/dhspublic/getAdvisoryCondition',
          dataType :  'xml',
          success  :  function parseThreatLevel(xml) {
                          var threatLevel = $(xml).find('threat_advisory').attr('condition');
                          $('#nationalThreatLevel').append(threatLevel);
                      }
      });
  });
  </code></pre>
  
  <p>Below is the HTML I'm trying to use. Thanks in advance for any help or advice!</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
      &lt;script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src='lib/parseThreatLevel.js'&gt;&lt;/script&gt;
          &lt;title&gt;National Threat Level&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id='nationalThreatLevel'&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>