2
Answers

Read Xml From Website in jquery

Cenk Isik

Cenk Isik

12y
2k
1
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)