¾È³çÇϼ¼¿ä ¿¡ÀÌÀ轺 °ü·ÃÇؼ Áú¹®Á» µå¸±²²¿ä
xml °ªÀ» Àоî¿À´Â°Í±îÁö´Â È®ÀÎÇß½À´Ï´Ù. ±×·±µ¥ ¹Þ¾Æ¿Â °ªÀ» ȸ鿡 »Ñ·ÁÁà¾ß Çϴµ¥
html ·Î ¹Ù·Î »Ñ·ÁÁÖÁö ¾Ê°í ¸®ÅÏ°ªÀ» ´Ù¸¥ ÀÚ¹Ù½ºÅ©¸³Æ® ÇÔ¼ö¿¡¼ È£ÃâÇØ »ç¿ëÇÏ°í ½Í½À´Ï´Ù.
<script type="text/javascript">
$.ajax({
url: "http://localhost:8080/xml/data.xml",
dataType : "xml",
type: "GET",
timeout: 1000,
success: function(xml) {
$(xml).find('entry').each(function () {
var $entry = $(this);
var html = "";
html += $entry.find('title').text();
});
}, error: function() {
alert("error");
}//end error
})
function showData()
{
}
</script>
À§¿¡¼ º¸½Ã¸é ajax·Î °¡Á®¿Â °ªÀ» showData ÇÔ¼ö¿¡¼ ºÒ·¯¿Í¼ »ç¿ëÇÏ°í ½Í½À´Ï´Ù.
´äº¯ ºÎŹµå¸®°Ú½À´Ï´Ù. | |
|