Cenk Isik

Cenk Isik

  • NA
  • 44
  • 29.9k

Read Xml From Website in jquery

Jul 12 2012 2:01 AM
I want to read xml website in jquery .Acctually I read xml from local xml file but I dont want this . My code is here  probably there is another way to do it 




<script type="text/javascript">
    $(document).ready(function(){
        
        $.ajax({
            
           url:"http://xml.alexa.com/data?cli=10&dat=nsa&url=gomm.com.vn",
           type:"GET",
           dataType: "xml",
           success: parseXml
               
           
        });
});
function parseXml(xml) { 

 $(xml).find("ALEXA").each(function() { 

 $("#output").append($(this).attr("VER") + " "); 

   }); }

</script>

Answers (2)