title: How to parse xml webservice response using Javascript or jQuery
body: <p>I want to use following xml webservice.
  <a href="http://www.musicbrainz.org/ws/2/artist/?query=artist:michael%20jackson" rel="nofollow noreferrer">www.musicbrainz.org/ws/2/artist/?query=artist:michael jackson</a></p>
  
  <p>which format is like below:</p>
  
  <pre><code>&lt;metadata&gt;&lt;artist-list offset="0" count="3418"&gt;&lt;artist ext:score="100" type="Person" id="f27ec8db-af05-4f36-916e-3d57f91ecf5e"&gt;&lt;name&gt;Michael Jackson&lt;/name&gt;&lt;sort-name&gt;Jackson, Michael&lt;/sort-name&gt;&lt;gender&gt;male&lt;/gender&gt;&lt;country&gt;US&lt;/country&gt;
  </code></pre>
  
  <p>I just want to parse this xml &amp; get the gender from it .
  I used following code to parse xml .
  Here i get ext attribute of the artist but not working .</p>
  
  <pre><code>    $.ajax({
          type: 'GET',
          url: 'http://www.musicbrainz.org/ws/2/artist/?query=artist:michael jackson',
          dataType: 'xml',
          success: function(xml){
             // console.log(xml);
              $(xml).find('artist-list').each(function(){
              $(this).find('artist').each(function(){
                              var ext = $(this).attr('ext');
                              alert(ext);
                      });
              });
      }
  </code></pre>
  
  <p>});</p>
  
  <p>Anybody can suggest me the example to parse xml using Javascript or jQuery.</p>