jquery get xml

This example gets an xml file containing a number of flights to various destinations. It parses the data and prints out each flight to the screen. You can see the xml file here: http://www.website-code-examples.com/css-html-jquery.nsf/offers.xml

You can see the result of the jquery get below - these are the elements from the xml file outputted to the screen

Code

<p>You can see the result of the jquery get below - these are the elements from the xml file outputted to the screen</p>
<div class="main">
</div>

<script>
$(document).ready(function () {
$.ajax({
type: "GET",
url: "/css-html-jquery.nsf/offers.xml",
dataType: "xml",
success: xmlParser
});
});

function xmlParser(xml) {
$('#load').fadeOut();
$(xml).find("Offer").each(function () {
$(".main").append('<div class="offer" style="margin-bottom:10px"><div>' + $(this).find("Iatatoname").text() + '</div><div>' + $(this).find("Nights").text() + ' nights</div><div >Cost £' + $(this).find("Adtcost").text() + '</div></div>');
$(".book").fadeIn(1000);
});

}

</script>