다연이네

[days13] AJAX 본문

JSP

[days13] AJAX

 다연  2021. 1. 13. 11:57
반응형

 1.  AJAX(Asynchronous Javascript And XML) (프로그램 언어가 아니라 기술)
                비동기적인          자바스크립트 +    XML 데이터
                                                        JSON
    ㄱ.  자바스크립트 언어를 사용해서 XML 데이터를 비동기적으로 서버-클라이언트 (간에 주고받는) 기술
         xml 데이터를 자바스크립트 언어를 사용해 비동기적으로 처리하는 기술
    ㄴ.  에이잭스 -- 에이작스 -- 아작스
    ㄷ.  비동기적 의미 ? 웹 페이지를 다시 로드하지 않고 웹 페이지 업데이트


 2.  AJAX 장점
    ㄱ.  페이지 전체 요청x -> 성능 향상
         -수신하는 데이터의 양을 줄일 수 있다. 
    ㄴ.  마치 스레드처럼 서버 처리하는 동안 기다리지 않고 또다른 비동기 처리를 요청할 수 있다. 
    ㄷ.  서버 측 처리를 각각 PC에서 분산 처리 가능  


 3.  AJAX 단점
    ㄱ.  보안 취약   (오픈 소스)
    ㄴ.  차별화 없음
    ㄷ.  브라우저 호환성 체크


 4.  AJAX 활용
    ㄱ.  회원가입
          -우편번호 검색 / ID 중복체크
    ㄴ.  한 줄 댓글 처리
    등등


 5.  AJAX 처리를 위한 절차(방법)
    ㄱ.  비동기적으로 처리하는 객체가 필요 - 브라우저마다 내장되어져 있음(XMLHttpRequest 객체)
        -XMLHttpRequest 객체를 통해 웹 서버에 요청 -> js 또는 jquery + DOM 데이터를 표시(사용)
        -모든 최신 브라우저(크롬, 엣지, 사파리, 익7 등)에서 XMLHttpRequest  제공
        var 변수명 = new XMLHttpRequest()
        - IES/6
          var 변수명 = new ActiveObject("Microsoft. XMLHTTP");
          
          var xmlHttp;
          if(window. XMLHttpRequest){ //브라우저 버전따라 나눌 수 있다. 
            xmlHttp = new XMLHttpRequest();
           }else{
            xmlHttp = 
        
    ㄴ.  요청에 대한 설정 + 요청(get,post)(일) 시킨다. 
         open()
         send()
         
    ㄷ.  callback 콜백함수를 호출 (갔다오면 호출되는 함수)
          요청 상태 체크 (잘갔다왔는지 결과물 가져왔는지) -> 결과값을 -> DOM 출력(처리)
   
 6-1.  GET방식 Ajax
    ㄱ.  XMLHttpRequest 객체
    ㄴ.  XMLHttpRequest 객체. open("GET", "/test. jsp?id=admin", true(true=비동기적))  

                                                      -요청 설정 (실제 갔다오는게 아니라 일 시킨 것)  
    ㄷ.  XMLHttpRequest 객체. send(null); -실제 요청
    
 6-2.  POST방식 Ajax
    ㄱ.  XMLHttpRequest 객체
    ㄴ.  XMLHttpRequest 객체. open("POST", "/test. jsp")  -요청 설정
    ㄷ.  XMLHttpRequest 객체. send("id=admin"); -실제 요청

     POST: 보안적인 측면 필요할때 /  파일 업로드 할때 등 
    
 7.  최신 브라우저는 도메인 간의 엑세스는 허용하지 않는다.  (네이버에서 다른 사이트 (kenik. com))
     (보안상의 이유)
 8.  최신 브라우저는 XMLHttpRequest 객체 대신 Fetch API를 사용할 수 있다. 
 
 9.  XMLHttpRequest 객체의 메소드
     ㄱ.  new XMLHttpRequest()
     ㄴ.  abort() 현재 요청 취소
     ㄷ.  getAllResponseHeaders() 모든 응답 헤더 정보 얻어오는 메소드 
     ㄹ.  getResponseHeader() 하나의 응답 헤더 정보만 얻어오는 메소드
 **ㅁ.  open(method, url, async, user, psw)
 **ㅂ.  send() --get
         send(param string) --post
     ㅅ.  setRequestHeader()
     
 10.  XMLHttpRequest 객체의 속성
     ㄱ.  onreadystatechange - XMLHttpRequest 객체의 준비상태(readystate)가 바뀔때마다 호출되는 이벤트 함수 정의
           onclick = function(){}처럼 클릭할때마다 호출되듯이 상태 바뀔때마다 호출
     ㄴ.  readyState :
           0 요청이 초기화되지 않았다. 
           1 서버 연결 설정
           2 요청 접수
           3 요청 처리
           4 요청이 완료되고 응답 준비가 되었다. 
     ㄷ.  status 속성 : 요청 결과를 정수 반환
           404 페이지를 찾을 수 없다
           500
           403 금지(다른 요청을 하게되면 금지)
          [200 확인(오류없이 응답 잘 받아왔을 때)]

     ㄹ.  responseText : 응답 결과를 문자열(String)  반환(로 받았다)
     ㅁ.  responseXML : 응답 결과를 XML 반환(로 받았다)   
     
     
     ajax 처리 안된다면 f12 눌러서 Network 가서 Status 200뜨나 확인하기

 

 

Ajax 사용해보기

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="">
<style>
</style>
<script>
   $(document).ready(function (){     
	   $("#btnAjax").on("click", function(event) {
	   	 $('#demo').load("ajax_info.txt", function (response, status, xhr) {
			if(status == "success"){
				alert("요청 성공");
			}else if(status =="error"){
				alert( xhr.status + ": " + xhr.statusText );
				
			};
		})
		
		//$('#demo').load("ajax_info.txt"); 얘만 있으면 콜백함수까지 한 것, jquery쓰면 아주 간단 (대신 의미는 정확히 알기)
		
	   });//click
   });//ready
</script>
</head>
<body>

<input type="button" value="js ajax" onclick="load('ajax_info.txt')"/><br>
<input type="button" value="jquery ajax" id="btnAjax" /><br>
<div id="demo"></div>

<script>
var httpRequest;
function getXMLHttpRequest(){ //브라우저 종류, 버전마다 해당하는 비동기 처리 요청 객체 얻어오는 함수
	if( window.ActiveXObject ){   // IE    window.ActiveXObject가 있다면 (윈도우 5,6점대로 옛날버전)
        try{
           return new ActiveXObject("Msxml2.XMLHTTP");   // 이게 적용되면 이거 가져오고
        }catch(e){
           try{
             return new ActiveXObject("Microsoft.XMLHTTP"); //안되면 이거 가져오고
           }catch(e){
              return null;
           }
        }
     }else if( window.XMLHttpRequest ){ //window.XMLHttpRequest가 있다면
        return new XMLHttpRequest(); //우리라면 다 필요없고 이거만 있어도 됨 (구버전 아니니까)
     }else{
        return null;
     }
	
}
 function load(url){
	 //alert("test")
	 //1. XMLHttpRequest 객체 얻어오기 : new XMLHttpRequest
	 httpRequest = getXMLHttpRequest();
	 //2. 요청 설정 : open()
	 httpRequest.onreadystatechange = callback; //콜백함수 호출
	 httpRequest.open("GET", url, true); //100프로 true(비동기적)이고 false줄일 없다
	 //3. 요청 실행 : send()
	 httpRequest.send(); //null줘도 좋고 안줘도 좋고
 }
 
 function callback() {
	if (httpRequest.readyState == 4) {
		if (httpRequest.status==200) { //요청잘했고 결과물도 잘 받아왔다면
			alert(httpRequest.responseText);
		$("#demo").html(httpRequest.responseText);
		} else {
			alert(">Ajax 요청 실패"+httpRequest.status);
		}
	}
}
</script>
</body>
</html>

ajax_info.txt (의미없는 텍스트)

<h1>AJAX</h1>
<p>AJAX is not a programming language.</p>
<p>AJAX is a technique for accessing web servers from a web page.</p>
<p>AJAX stands for Asynchronous JavaScript And XML.</p>

 

 


     
     

Ajax - jQuery를 사용해 간단하게 txt문서 가져와 출력하기

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="">
<style>
</style>
<script>
   $(document).ready(function (){     
	   //load() - jquery ajax method
	   //ex03_load.html 추가
	   $("#new-projects").load("ex03_load.html"); 
   });
</script>
</head>
<body>
<h3>Projects :</h3>
<ol id="new-projects"></ol>
</body>
</html>

ex03_load.html 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Sample Page</title>
</head>
<body>

<h1>Popular jQuery Projects</h1>

<ul id="projects">
   <li>jQuery</li>
   <li>jQuery UI</li>
   <li>jQuery Mobile</li>
   <li>QUnit</li>
   <li>Sizzle</li>
</ul>

</body>
</html>

만약 <script>에  $("#new-projects").load("ex03_load.html); 대신에 

$("#new-projects").load("ex03_load.html#projects li");를 주면

projects안에 li태그들만 긁어와 ol태그 안에 집어넣게 된다.

 

 

텍스트박스에 이름을 입력하고 3초 후 ajax 처리해 시간 출력하기

3초 후 알람창


 

<%@page import="java.util.Date"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="">
<style>
</style>
<script>
   $(document).ready(function (){     
   });
</script>
</head>
<body>
처음 ex04.jsp 페이지를 요청한 시간 : <%=new Date().toLocaleString() %>
<br>

<form action="" id="form1" name="form1">
  name: <input type="text" id="name" name="name" value="배다연" /> <br>
  <input type="button" value="js ajax" onclick="js_ex04_ajax()" />
</form>

<p id="demo"></p>
<!-- <a href="ex04_ajax.jsp?name=bae">ajax.jsp test</a> -->
<!--
 잘 처리된 것 확인
 >안녕하세요! 서버 Ajax 요청한 bae님. 요청시간: 2021. 1. 13 오전 10:42:27
 -->

<!--ex04_ajax.jsp  -->

<script>

 var httpRequest;
 
 function getXMLHttpRequest(){ //브라우저 종류, 버전마다 해당하는 비동기 처리 요청 객체 얻어오는 함수
 	if( window.ActiveXObject ){   // IE    window.ActiveXObject가 있다면 (윈도우 5,6점대로 옛날버전)
         try{
            return new ActiveXObject("Msxml2.XMLHTTP");   // 이게 적용되면 이거 가져오고
         }catch(e){
            try{
              return new ActiveXObject("Microsoft.XMLHTTP"); //안되면 이거 가져오고
            }catch(e){
               return null;
            }
         }
      }else if( window.XMLHttpRequest ){ //window.XMLHttpRequest가 있다면
         return new XMLHttpRequest(); //우리라면 다 필요없고 이거만 있어도 됨 (구버전 아니니까)
      }else{
         return null;
      }
 	
 }

  
  function callback() {
 	if (httpRequest.readyState == 4) {
 		if (httpRequest.status==200) { //요청잘했고 결과물도 잘 받아왔다면
 			alert(httpRequest.responseText);
 		$("#demo").html(httpRequest.responseText);
 		} else {
 			alert(">Ajax 요청 실패"+httpRequest.status);
 		}
 	}
 }
  
  
  
  function js_ex04_ajax() {
	  //GET
		var name= document.getElementById("name").value;
		var url = "ex04_ajax.jsp?name="+name;
		httpRequest = getXMLHttpRequest();
		 httpRequest.onreadystatechange = callback; 
		 httpRequest.open("GET", url, true); //100프로 true(비동기적)이고 false줄일 없다
		 httpRequest.send(); 
		 
		 
	  //POST
	  /* 
		var name= document.getElementById("name").value;
		var url = "ex04_ajax.jsp";
		httpRequest = getXMLHttpRequest();
		 httpRequest.onreadystatechange = callback; 
		 httpRequest.open("POST", url, true); //100프로 true(비동기적)이고 false줄일 없다
		 httpRequest.send("name="+name); //null줘도 좋고 안줘도 좋고
	 */
		 
		 
	}
 </script>
</body>
</html>

ex04_ajax.jsp

<%@page import="java.util.Date"%>
<%@page trimDirectiveWhitespaces="true"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  Thread.sleep(3000); //Ajax 처리 시간 3초 걸린다 (가정) 멈춰두기위해
  String name = request.getParameter("name");
  Date now = new Date();
  String ajaxResult = String.format(">안녕하세요! 서버 Ajax 요청한 %s님. 요청시간: %s", name, now.toLocaleString());
%>
<%=ajaxResult%>
<!-- 응답결과만을 뿌리니 html 태그 없음 -->

 

 

 

 

4초마다 자기자신 함수를 호출해 update된 데이터를 확인할 수 있는 예제

(실시간으로 king의 sal을 5000에서 1000으로 내려보자)

king의 sal을 1000으로 업데이트 하고 난 후 

다시 sal을 5000으로 업데이트 한 후

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script src="httpRequest.js"></script><!-- 스크립트 추가 -->

<link rel="stylesheet" type="text/css" href="">
<style>
</style>
<script>
   $(document).ready(function (){     
   });
</script>
</head>
<body>
<!-- httpRequest.js 추가 -->
<input type="button" value="Top 5" onclick="getTop5();" />
<p id="demo"></p>

<script>
var timer;

function callback(){
 	if (httpRequest.readyState == 4) {
 		if (httpRequest.status==200) { 
 		  $("#demo").html(httpRequest.responseText);
 		} else {
 			alert(">Ajax 요청 실패"+httpRequest.status);
 		}
 }
}

function getTop5() {
	var url = "ex05_top5.jsp";
	var params = null;
	var method = "GET";
	
	// httpRequest.js에서 참조한 메소드
	sendRequest(url, params, callback, method);
	
	timer = setTimeout(getTop5, 4000); //4초 후에 자기자신 함수를 계속 요청 (ajax로 계속 서버에서 데이터를 가져오겠다)
	//4초안에 킹의 sal을 update하면 그게 반영될 것
}

/* 


--king sal을 1000으로 update
update emp 
set sal = 1000
where empno = 7839;
commit;

update emp 
set sal = 5000
where empno = 7839;
commit;



*/
</script>
</body>
</html>

httpRequest.js

/**
 * httpRequest.js
 */

var httpRequest = null;

function getXMLHttpRequest(){
   if(window.ActiveXObject){
      try {
         return new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
         try {
            return new ActivXObject("Microsoft.XMLHTTP");
         } catch (e) {
            return null;
         }

      }
   }else if(window.XMLHttpRequest){
      return new XMLHttpRequest();       
   }else {
      return null;
   }
}

//  요청할 url, 파라미터, 콜백함수등록, get/post
function sendRequest(url,params,callback,method){ 
	
   httpRequest = getXMLHttpRequest(); 

   var httpMethod= method?method:'GET'; //메소드 넘어오면 그방식으로, 안넘어오면 GET방식으로

   if(httpMethod!='GET' && httpMethod!='POST') httpMethod='GET';  //GET이나 POST가 아니여도 GET 주겠다

   var httpParams = (params==null||params=="")?null:params; //파라미터 안넘어오거나 null이면 null, 넘어오면 그 값

   var httpUrl = url;

   if(httpMethod=='GET' && httpParams!=null){ //넘어오는 파라미터가 있고 GET방식이면 url뒤에 붙히겠다
      httpUrl= httpUrl +"?"+httpParams;
   }     

   httpRequest.open(httpMethod,httpUrl,true); // true 비동기적..

   // [XMLHTTP를 사용해서 통신할 때 규약] 
   // httpRequest.setRequestHeader('Content-Type','application/x-www-form-unlencoded');    
   httpRequest.onreadystatechange = callback;    
   httpParams = (httpMethod=='POST'?httpParams:null ); //POST면 send(여기 파라미터 주기)
   httpRequest.send( httpParams); // 요청처리...
}

 

ex05_top5.jsp

<%@page import="java.util.Calendar"%>
<%@page import="com.util.ConnectionProvider"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@ page trimDirectiveWhitespaces="true" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  Connection conn = null;
  PreparedStatement pstmt = null;
  ResultSet rs = null;
  String sql = "with temp as ("
              +"   select empno, ename, sal, "
              +"          rank() over(order by sal desc) r "
              +"   from emp "
              +")"
              +" select * from temp "
              +" where r <= 5 ";
  
  Calendar cal = Calendar.getInstance();
  String now = String.format("%tT", cal);
  
  String responseText = "<h3>" + now + "</h3>";
  try{
     conn =  ConnectionProvider.getConnection();
     pstmt = conn.prepareStatement(sql);
     rs =  pstmt.executeQuery();
     while(rs.next()){
        int rank = rs.getInt("r");
        int empno = rs.getInt("empno");
        String ename = rs.getString("ename");
        double sal = rs.getDouble("sal");
        
        responseText +=String.format("[%d] %d %s\t\t(%.2f)<br>"
              , rank, empno, ename, sal);
     } 
  }catch(Exception e){
     e.printStackTrace();
  }finally{
     try{
        pstmt.close();rs.close();conn.close();
     }catch(Exception e){}
  }
%>
<%= responseText %>

 

 

 

 

XML 파일 사용해보기

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="">
<style>
table,th,td {
  border : 1px solid black;
  border-collapse: collapse;
}
th,td {
  padding: 5px;
}
</style>
<script>
   $(document).ready(function (){     
   });
</script>
</head>
<body>
<!-- 
1. cd_catalog.xml 추가
 -->
 
 <h2>The XMLHttpRequest Object</h2>

<button type="button" onclick="loadDoc()">Get my CD collection</button>
<br><br>
<table id="demo"></table>

<script>
function loadDoc() {
	var xhttp = new XMLHttpRequest(); //최신 브라우저들은 다 이거 씀
	xhttp.onreadystatechange = function () {
		//this == xhttp 
		if (this.readyState==4 && this.status==200) { //요청 완료, 성공했다면
			var xmlDoc = this.responseXML; //결과 받기 브라우저가 자동으로 XML문서를 XML DOM으로 만듦
																//그래서 우리는 DOM 처리를 하면 됨
			
			var table="<tr><th>Artist</th><th>Title</th></tr>";
	           var x = xmlDoc.getElementsByTagName("CD");
	           for (i = 0; i <x.length; i++) { 
	             table += "<tr><td>" +
	             x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue +
	             "</td><td>" +
	             x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue +
	             "</td></tr>";
	           }
	           
	           document.getElementById("demo").innerHTML = table;
	           
	      } // if
	     }  // function
	     xhttp.open("GET", "cd_catalog.xml", true);
	     xhttp.send();
	  }
	  //xml 돔이든 html 돔이든 사용법 똑같다
	</script>  
</body>
</html>

cd_catalog.xml

<?xml version="1.0" encoding="UTF-8"?>
<CATALOG>
  <CD>
    <TITLE>Empire Burlesque</TITLE>
    <ARTIST>Bob Dylan</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1985</YEAR>
  </CD>
  <CD>
    <TITLE>Hide your heart</TITLE>
    <ARTIST>Bonnie Tyler</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>CBS Records</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1988</YEAR>
  </CD>
  <CD>
    <TITLE>Greatest Hits</TITLE>
    <ARTIST>Dolly Parton</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>RCA</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1982</YEAR>
  </CD>
  <CD>
    <TITLE>Still got the blues</TITLE>
    <ARTIST>Gary Moore</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Virgin records</COMPANY>
    <PRICE>10.20</PRICE>
    <YEAR>1990</YEAR>
  </CD>
  <CD>
    <TITLE>Eros</TITLE>
    <ARTIST>Eros Ramazzotti</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>BMG</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1997</YEAR>
  </CD>
  <CD>
    <TITLE>One night only</TITLE>
    <ARTIST>Bee Gees</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Polydor</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1998</YEAR>
  </CD>
  <CD>
    <TITLE>Sylvias Mother</TITLE>
    <ARTIST>Dr.Hook</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>CBS</COMPANY>
    <PRICE>8.10</PRICE>
    <YEAR>1973</YEAR>
  </CD>
  <CD>
    <TITLE>Maggie May</TITLE>
    <ARTIST>Rod Stewart</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Pickwick</COMPANY>
    <PRICE>8.50</PRICE>
    <YEAR>1990</YEAR>
  </CD>
  <CD>
    <TITLE>Romanza</TITLE>
    <ARTIST>Andrea Bocelli</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>Polydor</COMPANY>
    <PRICE>10.80</PRICE>
    <YEAR>1996</YEAR>
  </CD>
  <CD>
    <TITLE>When a man loves a woman</TITLE>
    <ARTIST>Percy Sledge</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Atlantic</COMPANY>
    <PRICE>8.70</PRICE>
    <YEAR>1987</YEAR>
  </CD>
  <CD>
    <TITLE>Black angel</TITLE>
    <ARTIST>Savage Rose</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>Mega</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1995</YEAR>
  </CD>
  <CD>
    <TITLE>1999 Grammy Nominees</TITLE>
    <ARTIST>Many</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Grammy</COMPANY>
    <PRICE>10.20</PRICE>
    <YEAR>1999</YEAR>
  </CD>
  <CD>
    <TITLE>For the good times</TITLE>
    <ARTIST>Kenny Rogers</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Mucik Master</COMPANY>
    <PRICE>8.70</PRICE>
    <YEAR>1995</YEAR>
  </CD>
  <CD>
    <TITLE>Big Willie style</TITLE>
    <ARTIST>Will Smith</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1997</YEAR>
  </CD>
  <CD>
    <TITLE>Tupelo Honey</TITLE>
    <ARTIST>Van Morrison</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Polydor</COMPANY>
    <PRICE>8.20</PRICE>
    <YEAR>1971</YEAR>
  </CD>
  <CD>
    <TITLE>Soulsville</TITLE>
    <ARTIST>Jorn Hoel</ARTIST>
    <COUNTRY>Norway</COUNTRY>
    <COMPANY>WEA</COMPANY>
    <PRICE>7.90</PRICE>
    <YEAR>1996</YEAR>
  </CD>
  <CD>
    <TITLE>The very best of</TITLE>
    <ARTIST>Cat Stevens</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Island</COMPANY>
    <PRICE>8.90</PRICE>
    <YEAR>1990</YEAR>
  </CD>
  <CD>
    <TITLE>Stop</TITLE>
    <ARTIST>Sam Brown</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>A and M</COMPANY>
    <PRICE>8.90</PRICE>
    <YEAR>1988</YEAR>
  </CD>
  <CD>
    <TITLE>Bridge of Spies</TITLE>
    <ARTIST>T'Pau</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Siren</COMPANY>
    <PRICE>7.90</PRICE>
    <YEAR>1987</YEAR>
  </CD>
  <CD>
    <TITLE>Private Dancer</TITLE>
    <ARTIST>Tina Turner</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Capitol</COMPANY>
    <PRICE>8.90</PRICE>
    <YEAR>1983</YEAR>
  </CD>
  <CD>
    <TITLE>Midt om natten</TITLE>
    <ARTIST>Kim Larsen</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>Medley</COMPANY>
    <PRICE>7.80</PRICE>
    <YEAR>1983</YEAR>
  </CD>
  <CD>
    <TITLE>Pavarotti Gala Concert</TITLE>
    <ARTIST>Luciano Pavarotti</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>DECCA</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1991</YEAR>
  </CD>
  <CD>
    <TITLE>The dock of the bay</TITLE>
    <ARTIST>Otis Redding</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Stax Records</COMPANY>
    <PRICE>7.90</PRICE>
    <YEAR>1968</YEAR>
  </CD>
  <CD>
    <TITLE>Picture book</TITLE>
    <ARTIST>Simply Red</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>Elektra</COMPANY>
    <PRICE>7.20</PRICE>
    <YEAR>1985</YEAR>
  </CD>
  <CD>
    <TITLE>Red</TITLE>
    <ARTIST>The Communards</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>London</COMPANY>
    <PRICE>7.80</PRICE>
    <YEAR>1987</YEAR>
  </CD>
  <CD>
    <TITLE>Unchain my heart</TITLE>
    <ARTIST>Joe Cocker</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>EMI</COMPANY>
    <PRICE>8.20</PRICE>
    <YEAR>1987</YEAR>
  </CD>
</CATALOG>

 

반응형
Comments