Using JSON you need something like
$(function () {
var Key = 'XXXXXX';
var Croydon = '324152';
var url = 'http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/json/' + Croydon + '?res=daily&key=' + Key;
$.get(url, null, processDailyForecast);
});
function processDailyForecast(data) {
var details = '';
$.each(data.SiteRep.DV.Location.Period, function (name, Period) {
details += '<p>' + Period.value;
$.each(Period.Rep, function (name, value) {
if (value.$ == 'Day') {
details += '<p>' + value.$ + ' : ' + value.Dm + '</p>';
}
else{
details += '<p>' + value.$ + ' : ' + value.Nm + '</p>';
}
});
details += '</p>';
});
$('#dailyForecast').html(details);
}