print out xml data that is loaded in javascript / AJAX

Paranoid the reason nothing is coming out is that nothing is coming in? This is a nice and easy alert option to print out your XML doc as an alert, so you know the data’s there. If nothing’s working – it’s some other reason!

$.ajax({
type: "GET",
url: "courses.xml",
dataType: "xml",
success: function (data) {
alert("data loaded: " + new XMLSerializer().serializeToString(data));

}
Tech Reference: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑