 <p>Try to save your code at jsfiddle, show it.</p> <p>Start debugging:</p> <ol> <li>response - <code>console.log(xml);</code></li> <li>is true - <code>$('#selectYear option').length == 0</code></li> <li>is largest then 0 - <code>$(xml).find('year').length</code></li> </ol>