<script type="text/javascript"> $(document).ready(function(){ $.ajax({ url:"City.xml", dataType:"xml", success:function(data){ $(data).find("province").each(function(){ var t = $(this).attr("name");//this-> alert(t) //$("#DropProvince").append("<option>"+t+"</option>"); }); } }); }); </script>