jQuery ile XML veri çekimi yapmak istiyorum ancak ne $.get ne de $.ajax fonksiyonları çalışmıyor.
<script src="http://code.jquery.com/jquery-2.1.4.min.js" type="text/javascript"></script>
$.ajax({
type: "GET",
url: "hello.xml",
dataType: "xml",
success: function(xml) {
alert("başarılı");
}
//other code
error: function() {
alert("The XML File could not be processed correctly.");
}
});jquery sürümünde mi sorun var acaba ?hello.xml içeriği ;
<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > <title>Hello world 1</title> <link>Hello world 1</link> </rss>