$(document).ready(function () {
    $.ajax({
        type: "GET",
        url: "/info/xml/data.xml",
        dataType: "xml",
        success: xmlParser
    });
});
	
function xmlParser(xml) {
    count = 0;
	$(xml).find("entry").each(function () {
		if(count < 100) {			
			var num = $(xml).find("dl").length;
			if($(this).find("urls").text() == "") {
				$("#newsWrap").append('<dl class="newsList clear"><dt class="title">' + $(this).find("date").text() + '</dt><dd class="description">' + $(this).find("titles").text() + '</dd></dl>');
			} else {
				$("#newsWrap").append('<dl class="newsList clear"><dt class="title">' + $(this).find("date").text() + '</dt><dd class="description"><a href="' + $(this).find("urls").text() + '" target="' + $(this).find("targetWin").text() + '">' + $(this).find("titles").text() + '</a></dd></dl>');
			}
			count++;
		} else {
			return false;
		}
    });
}


