title: Jquery - iterate through all xml tags
body: <p>how to loop over all tags in a xml</p>
  
  <p>i have a php that generates xmls like the next one</p>
  
  <pre><code>&lt;register&gt;
    &lt;name&gt;peter&lt;/name&gt;
    &lt;age&gt;12&lt;/age&gt;
  &lt;/register&gt; 
  &lt;register&gt;
    &lt;name&gt;mary&lt;/name&gt;
    &lt;age&gt;20&lt;/age&gt;
  &lt;/register&gt; 
  </code></pre>
  
  <p>so i receive this xml (this works fine)</p>
  
  <pre><code>$.ajax({success: function(xml) {  
  
     $(xml).find('register').each (function() 
     { 
       alert($(this).find('name').text()) // works fine, shows peter then mary on the next loop of "each"
  
  
  
       // But if i dont know the tag names (name,age) for each register ?     
  
       // Something like
  
        $(this).nodes().each .... // 
   alert($(this).tagName);  // i wanna show "name" &amp; "age", how can i get the tag names inside each register in my xml sample tree?
  
     });    
  
  }});
  </code></pre>