title: Extracting XML data using javascript
body: <pre><code>   &lt;!--  http://www.abc.com  --&gt;
      &lt;rss version="2.0"&gt;
      &lt;channel&gt;
      &lt;title&gt;SENSEX view&lt;/title&gt;
      &lt;link&gt;http://www.abc.com&lt;/link&gt;
      &lt;copyright&gt;Copyright 2009, abc&lt;/copyright&gt;
      &lt;item&gt;
      &lt;title&gt;
      &lt;![CDATA[ SENSEX : 20263.71 * -382.93 (-1.85 %) ]]&gt;
      &lt;/title&gt;
      &lt;link/&gt;
      &lt;pubDate&gt;9/20/2013 4:00:00 PM&lt;/pubDate&gt;
      &lt;author&gt;abc&lt;/author&gt;
      &lt;guid/&gt;
      &lt;/item&gt;
      &lt;/channel&gt;
      &lt;/rss&gt;
  </code></pre>
  
  <p>I want to extract "<code>&lt;![CDATA[ SENSEX : 20263.71 * -382.93 (-1.85 %) ]]&gt;</code>" from above XML data in a variable. I am not familiar handling  XML using javascript. So i need some help or suggest me some tutorials ??</p>
  
  <p>Here's what i have got :</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" &gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
  $.ajax({
      type: "GET",
      url: "http://rss.xml",
      dataType: "xml",.find("title")
      success: function(xml) {
          $(xml).find("title").each(function(){
  
              var title = $(this).find('title').text();
              $(this).find('title').each(function()
              {
                  alert(title );
  
              });
          });
      }
  });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>