ajax and XML don't parsed
Hi, i tried to retrieve a xml response from my server, but that's dont work
My javascript :
-
$.post("/index/contactssearch", {queryString: ""+inputString+""}, function(data){
if(data.length >0) {
$('#suggestions').show();
$(data).find('element').each(function() {
$('#autoSuggestionsList').html('<li>'+$(this).text+"</li>" );
});
} else {
$('#autoSuggestionsList').html('Aucun enregistrement trouvé');
}
});
And my XML response ( if i make alert('data) ) :
-
<?xml version="1.0" encoding="iso-8859-1"?>
<element>pierre dupont</element>
This script never go on the callback .each(function() {
Thank you !
PS : Excuse my english
