I have an XML document which contains some invalid characters (é for example). Unfortunalty I cannot change the source XML file, and the file must be read through AJAX. How can I escape these characters client side?
Much thanks,
Steve
EDIT:
$.ajax({
type: "GET",
url: "http://foo.com",
dataType: "xml",
success: function(xml) {
$(xml).find('images').each(function(){
$(this).find('pic').each(function() {
...code...
});
});
},
error: function(XMLHttpRequest, textStatus, errorThrown){
alert(textStatus);
}
})