title: Retrieving a specific XML node, jQuery
body: <p>Relatively new to dealing with XML in jQuery. I am trying to retrieve a specific node from an XML file based on an attribute in its parent element. Here is the XML (short version):</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="UTF-8"?&gt;
          &lt;members&gt;
             &lt;member row="1"&gt;
                &lt;firstName&gt;John&lt;/firstName&gt;
                &lt;lastName&gt;Smith&lt;/lastName&gt;
                &lt;status&gt;Active&lt;/status&gt;
                &lt;title&gt;Member&lt;/title&gt;
                &lt;memberSince&gt;August, 2011&lt;/memberSince&gt;
             &lt;/member&gt;
            &lt;member row="2"&gt;
                &lt;firstName&gt;Jane&lt;/firstName&gt;
                &lt;lastName&gt;Smith&lt;/lastName&gt;
                &lt;status&gt;Active&lt;/status&gt;
                &lt;title&gt;Member&lt;/title&gt;
                &lt;memberSince&gt;October, 2011&lt;/memberSince&gt;
             &lt;/member&gt;
       &lt;/members&gt;
  </code></pre>
  
  <p>I understand the basics of how to retrieve XML using <code>$.get()</code> in jQuery but cannot seem to figure out how to retrieve just the details for, say, <code>member row="2"</code>.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Here is the jQuery I am using for this simple test, the alert returns as <code>undefined</code></p>
  
  <pre><code>$(document).ready(function() {
      $.get(
          'member_xml.php', function($xml) {
              $xml = $($xml);
              row = 2;
              var test = $xml.find('member[row="' + row + '"]').attr('firstName');
              alert(test);
          },
          'xml'
      );
  });
  </code></pre>