RSS

개요

RSS는 웹 사이트에 제목이나 내용을 간단히 요약하여 배포하기 위한 포멧이다. 주로 업데이트 정보를 공개하는데 사용한다.

일반적으로 블로그의 업데이트 정보를 배포하는 데 사용하지만, 뉴스 사이트나 TV 편성표 사이트에서 새로운 기사 또는 프로그램 정보를 배포하거나 기업에서 제품 정보를 베포하는 등의 사례도 많이 볼 수 있다.

RSS 용어는 아래와 같이 단어로 불리기도 한다.

  • RDF Site Summary
    • RDF는 Resource Description Framework의 약어로, 메타데이터를 작성하는 도구라는 뜻이다.
    • 즉, ‘이러한 정보를, 이러한 형태로 작성합시다’라는 약정한 것이다.
  • Really Simple Syndication
    • 매우 간단한 배급
  • Rich Site Summary
    • 풍부한 사이트 요약 정보

RSS의 등장과 성장

RSS의 최초 개발은 브라우저로 유명한 Netscape사에서 당시 인터넷 최대 포털 사이트인 네스케이프사의 넷센터(NetCenter)에서 출발한 개념이다. 이것은 유명 신문사의 기사를 손쉽게 제공하기 위하여 고안되었다.

넷스케이의 개발역사를 잠시 살펴본다면 95년 MCF(Meta Content Framework)에서 출발한 RSS 형식은 RDF(Resource Description Framework)과 CDF(Channel Definition Format)의 발전과정을 거쳐, RSS(RDF Site Summary)로 등장하게 되지만, Netscape사가 RSS 0.9 버전을 마지막으로 더 이상의 개발을 포기하게 되었으며, 이후 두 개의 개발그룹이 형성되어 개발이 진행되어 왔기 때문에 2개의 이름을 가지게 되었다.

RSS 여러 표준

RSS-DEV Working Group의 RSS(RDF Site Summary) 1.0과 UserLand의 RSS(Really Simple Syndication) 2.0이 업계 표준으로 있다.
두 개의 규격이 기능상 약간씩의 차이가 있지만 UserLand의 2.0이 좀 더 상세한 기능을 제공하고 있다.

  • RSS 1.* : RDF에 기반한 규격
    • RSS 0.9
    • RSS 1.0
    • RSS 1.1 (2005년 1월)
  • RSS 2.0 : RDF에 기반하지 않는 규격
    • RSS 0.91
    • RSS 0.92
    • RSS 0.93
    • RSS 0.94
    • RSS 2.01

이 밖에 기타 포맷으로 2004년 12월 야후에서는 Media RSS 포맷을 발표하기도 하였고, 2004년 말을 기점으로 RSS 포맷을 확장하여 Podcasting에 응용하는 방식도 등장하였다.

RSS의 확산과 더불어 컨텐츠 신디케이션의 중요도에 대한 인식과 새로운 기능, 그리고 표준화의 필요성이 대두되었다. 컨텐츠 신디케이션 표준화를 위한 많은 논의와 노력들이 진행되었으나, 사실상 RSS 규격을 단일화 시키고 표준화 시키기 어렵다는 결론에 도달하게 되었고, 새로운 표준화를 위한 Atom이라는 이름의 프로젝트로 구체화되었다.

이렇듯 RSS는 계속하여 진화하고 있다. 약간의 방식차이는 있지만 “개방형"이라는 기본 철학을 바탕으로 발전하기 때문에 RSS는 인터넷의 자리로 자리잡아 가고 있다.

RSS 서비스의 장점

RSS의 장점은 아래와 같다.

  • 선택적 구독
    • 사용자가 원하는 topic과 정확히 일치하는 channel 선택
  • 빠른 구독
    • 동시에 다양한 channel 소스 접근
  • History 관리
    • 다양한 channel의 과거 기록들 보관이 가능하며
  • 자동화된 컨텐츠 연동이 용이
    • syndication / aggregation
  • 컨텐츠 재사용성
    • 구조화된 XML 데이타로 손쉬운 변환 및 처리가 가능
  • 커뮤니케이션 방식의 변화
    • 1:1에서 1:N으로 동시 접속

RSS 2.0 Specification

0. <rss> Element

<rss version="2.0">
</rss>
  • RSS 2.0을 준수하는 문서는 문서 요소로 ‘rss’ 이름의 Element를 가져야 한다.
  • <rss> Element는 속성로 version을 반드시 가져야 하며 그 값은 항상 “2.0"이다.
  • <rss> Element는 <channel> Element를 자식으로 갖는다.

1. <channel> Element

<rss version="2.0">
	<channel>
	</channel>
</rss>
  • 채널(channel)은 웹 사이트에 대응되는 개념이다.
  • 자식 Element로 3개의 필수 요소와 15개의 선택 요소를 갖는다.

1.1. <title> Element (필수)

<rss version="2.0">
	<channel>
		<title>{channel_title}</title>
	</channel>
</rss>
  • 채널의 이름이다.
  • 웹 사이트의 이름과 같게 지정하면 된다.
  • 필수 요소이다.
<rss version="2.0">
	<channel>
		<link>{channel_link}</link>
	</channel>
</rss>
  • 이 RSS를 공급하는 웹 사이트의 주소이다.
  • 필수 요소이다.

1.3. <description> Element (필수)

<rss version="2.0">
	<channel>
		<description>{channel_description}</description>
	</channel>
</rss>
  • 이 채널(웹 사이트)을 소개하거나 그 내용을 설명하는 홍보 문장이다.
  • 필수 요소이다.

1.4. <language> Element

<rss version="2.0">
	<channel>
		<language>{channel_language}</language>
	</channel>
</rss>
  • 이 채널의 주 언어를 지정한다.
  • ISO 639 표준에 따른다.
    • KO : 한국어(Korean)
    • EN : 영어(English)
<rss version="2.0">
	<channel>
		<copyright>{channel_copyright}</copyright>
	</channel>
</rss>
  • 저작권 관련 문구를 넣는다.

1.6. <managingEditor> Element

<rss version="2.0">
	<channel>
		<managingEditor>{channel_managingEditor}</managingEditor>
	</channel>
</rss>
  • 게시글 편집자 이메일 주소를 적는다.

1.7. <webMaster> Element

{channel_webMaster} - 사이트 관리자 이메일 주소를 적는다.

1.8. <pubDate> Element

<rss version="2.0">
	<channel>
		<pubDate>{channel_pubDate}</pubDate>
	</channel>
</rss>
  • 이 RSS의 발행 날짜와 시각을 적는다.
  • RFC 822 형식을 따른다.

1.9. <lastBuildDate> Element

<rss version="2.0">
	<channel>
		<lastBuildDate>{channel_lastBuildDate}</lastBuildDate>
	</channel>
</rss>
  • 이 채널에서 게시물이 마지막으로 수정된 시각을 적는다.
  • pubDate와 동일하게 RFC 822 형식을 따른다.

1.10. <category> Element

<rss version="2.0">
	<channel>
		<category>{channel_category}</category>
	</channel>
</rss>
  • 이 채널의 주제 또는 분류를 적는다.
  • 게시물에 붙는 ‘category’에 대한 규칙과 같은 규칙이 적용되며 하나 이상의 ‘category’ 태그를 가질 수 있다.

1.11. <generator> Element

<rss version="2.0">
	<channel>
		<generator>{channel_generator}</generator>
	</channel>
</rss>
  • 이 RSS를 발행하기 위해 사용된 소프트웨어의 이름을 넣는다.

1.12. <docs> Element

<rss version="2.0">
	<channel>
		<docs>{channel_docs}</docs>
	</channel>
</rss>
  • 이 RSS를 수신할 수 있는 주소를 넣는다.

1.13. <cloud> Element

<rss version="2.0">
	<channel>
		<cloud domain="{channel_cloud_domain}"
		       port="{channel_cloud_port}"
		       path="{channel_cloud_path}"
		       registerProcedure="{channel_cloud_registerProcedure}"
		       protocol="{channel_cloud_prococol}" />
	</channel>
</rss>
  • 실시간 통지와 의견 교환 등 RSS Cloud 관련 기능을 지정하는 노드이다.
  • protocol은 통신 방식으로 xml-rpc, http-post, soap 1.1 등이 지정될 수 있다.
  • 나머지 항목은 메시지를 전송할 경로 및 프로시저이다.
  • 예를 들어, xml-rpc를 사용하며 domain="rpc.sys.com" port="80" path="/rpc" registerProcedure="myCloud.rssPleaseNotify"와 지정되어 있다면, rpc.sys.com:80/rpc에서 myCloud.rssPleaseNotify 프로시저를 실행하여 피드를 전송한다는 뜻이 된다.

1.14. <ttl> Element

<rss version="2.0">
	<channel>
		<ttl>{channel_ttl}</ttl>
	</channel>
</rss>
  • 새로 수신할 때까지 캐싱할 수 있는 횟수를 제한한다.

1.15. <image> Element

<rss version="2.0">
	<channel>
		<image>...</image>
	</channel>
</rss>
  • 이 채널을 대표하는 로고 등의 그림을 지정한다.
  • 3개의 필수 요소가 3개의 선택 요소를 자식 엘리먼트로 가질 수 있다.
    • 필수 요소: <url>, <title>, <link>

1.15.1 <url> Element (필수)

<rss version="2.0">
	<channel>
		<image>
			<url>{channel_image_url}</url>
		</image>
	</channel>
</rss>
  • 그림 파일의 위치를 나타내는 URL이다.
  • HTML의 img 태그 중 src 속성과 같은 용도이다.
  • <image> 요소의 필수 요소이다.

1.15.2. <title> Element (image 요소의 필수)

<rss version="2.0">
	<channel>
		<image>
			<title>{channel_image_title}</title>
		</image>
	</channel>
</rss>
  • 그림 파일의 제목 또는 설명을 나타내는 텍스트이다.
  • HTML의 img 태그 중 alert 속성과 같은 용도이다.
  • <image> 요소의 필수 요소이다.
<rss version="2.0">
	<channel>
		<image>
			<link>{channel_image_link}</link>
		</image>
	</channel>
</rss>
  • 그림 파일을 클릭할 때 이동할 URL이다.
  • <image> 요소의 필수 요소이다.

1.15.4. <width> Element

<rss version="2.0">
	<channel>
		<image>
			<width>{channel_image_width}</width>
		</image>
	</channel>
</rss>
  • 그림의 폭이다. 기본값은 88, 최대 144 픽셀이다.

1.15.5. <height> Element

<rss version="2.0">
	<channel>
		<image>
			<height>{channel_image_height}</height>
		</image>
	</channel>
</rss>
  • 그림의 높이이다.
  • 기본값은 31, 최대 400 픽셀이다.

1.16. <textInput> Element

<rss version="2.0">
	<channel>
		<textInput>...</textInput>
	</channel>
</rss>
  • 채널에 표시될 수 있는 텍스트 상자를 지정한다.
  • 주로 게시물 검색이나 피드백 관련 기능을 구현하기 위해 활용될 수 있다.
  • 대부분의 RSS 수집기는 이 태그를 무시한다. 4개의 엘리먼트를 필수 요소로 가진다.

1.16.1. <description> Element (textInput의 필수 요소)

<rss version="2.0">
	<channel>
		<textInput>
			<description>{channel_textInput_description}</description>
		</textInput>
	</channel>
</rss>
  • 이 텍스트 상자에 대한 설명이다.
  • <textInput>의 필수 요소이다.

1.16.2. <name> Element (textInput의 필수 요소)

<rss version="2.0">
	<channel>
		<textInput>
			<name>{channel_textInput_name}</name>
		</textInput>
	</channel>
</rss>
  • 이 텍스트 상자의 이름이다.
  • CGI로 쿼리를 전송할 때 이 텍스트 상자를 통해 보내는 정보의 변수명으로 쓰인다.
  • <textInput>의 필수 요소이다.

1.16.3. <title> Element (textInput의 필수 요소)

<rss version="2.0">
	<channel>
		<textInput>
			<title>{channel_textInput_title}</title>
		</textInput>
	</channel>
</rss>
  • Submit 버튼에 보여줄 ‘검색’ 또는 ‘등록’ 등의 단어이다.
  • <textInput>의 필수 요소이다.
<rss version="2.0">
	<channel>
		<textInput>
			<link>{channel_textInput_link}</link>
		</textInput>
	</channel>
</rss>
  • Submit 단추를 눌렀을 때 쿼리를 받을 CGI의 URL을 지정한다.
  • image 태그의 필수 요소이다.

<textInput>의 예시:

<rss version="2.0">
	<channel>
		<textInput>
			<description>Google Search</description>
			<title>Keyword = </title>
			<name>q</name>
			<link>http://www.google.com/search?</link>
		</textInput>
	</channel>
</rss>

1.17. <skipHours> Element

<rss version="2.0">
	<channel>
		<skipHours>{channel_skipHours}</skipHours>
	</channel>
</rss>
  • 0시부터 23시의 범위를 가지며 RSS 수집기가 이 시간대에는 수신을 하지 않도록 지정한다.

1.18. <skipDays> Element

<rss version="2.0">
	<channel>
		<skipDays>{channel_skipDays}</skipDays>
	</channel>
</rss>
  • Monday, Tuesday, Wednesday, Thursday, Friday, Saturday 및 Sunday 중 하나이며, RSS 수집기가 여기서 지정한 요일에는 수신을 하지 않도록 지정한다.

1.19. <item> Element

<rss version="2.0">
	<channel>
		<item>...</item>
	</channel>
</rss>
  • 채널에 올라온 게시물을 나타낸다.
  • 3개의 필수 엘리먼트와 7개의 선택 요소를 갖는다.

1.19.1. <title> Element (item의 필수 요소)

<rss version="2.0">
	<channel>
		<item>
			<title>{channel_item_title}</title>
		</item>
	</channel>
</rss>
  • 게시물의 제목이다.
  • <item>의 필수 요소이다.
<rss version="2.0">
	<channel>
		<item>
			<link>{channel_item_link}</link>
		</item>
	</channel>
</rss>
  • 게시물의 URL이다.
  • <item>의 필수 요소이다.

1.19.3. <description> Element (item의 필수 요소)

<rss version="2.0">
	<channel>
		<item>
			<description>{channel_item_description}</description>
		</item>
	</channel>
</rss>
  • 게시물의 본문 또는 본문 중 일부이다.
  • <item>의 필수 요소이다.

1.19.4. <author> Element

<rss version="2.0">
	<channel>
		<item>
			<author>{channel_item_author}</author>
		</item>
	</channel>
</rss>

게시물 작성자의 이메일 주소이다.

1.19.5. <category> Element

<rss version="2.0">
	<channel>
		<item>
			<category>{channel_item_category}</category>
		</item>
	</channel>
</rss>
  • 게시물이 속한 범주, 분류이다.

1.19.6. <comments> Element

<rss version="2.0">
	<channel>
		<item>
			<comments>{channel_item_comments}</comments>
		</item>
	</channel>
</rss>
  • 게시물에 대한 댓글을 읽을 수 있는 주소이다.

1.19.7. <enclosure> Element

<rss version="2.0">
	<channel>
		<item>
			<enclosure url="{channel_item_enclosure_url}" length="{channel_item_enclosure_length}" type="{channel_item_enclosure_type}" />
		</item>
	</channel>
</rss>
  • 게시물에 첨부된 파일과 관련된 노드이다.
  • 첨부파일의 주소인 url, 파일의 크기를 바이트 단위로 나타낸 length, 파일의 MIME 형식을 나타내는 type 속성을 가진다.

1.19.8. <guid> Element

<rss version="2.0">
	<channel>
		<item>
			<guid>{channel_item_guid}</guid>
			<!-- 또는 -->
			<guid isPermaLink="{channel_item_guid_isPermaLink}">{channel_item_guid}</guid>
		</item>
	</channel>
</rss>
  • 이 게시물만을 프로그램적으로 식별할 수 있는 고유 문자열이다.
  • isPermaLink 속성이 true라면 이 게시물에 지정된 GUID가 웹 브라우저로 열어볼 수 있는 URL임을 지정한다.

1.19.9. <pubDate> Element

<rss version="2.0">
	<channel>
		<item>
			<pubDate>{channel_item_pubDate}</pubDate>
		</item>
	</channel>
</rss>
  • 이 게시물이 등록된 날짜이다.

1.19.10. <source> Element

<rss version="2.0">
	<channel>
		<item>
			<source url="{channel_item_source_url}">{channel_item_source}</source>
		</item>
	</channel>
</rss>
  • 이 게시물이 다른 RSS에서 온 것이라면 해당 RSS의 이름({channel_item_source})과 주소({channel_item_source_url})를 나타낸다.

RSS 2.0으로 작성한 RSS 예제

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Liftoff News</title>
      <link>http://liftoff.msfc.nasa.gov/</link>
      <description>Liftoff to Space Exploration.</description>
	  <textinput>
	      <description>Search Google</description>
		  <title>Search</title>
		  <link>http://www.google.no/search?</link>
		  <name>q</name>
	  </textinput>
      <language>en-us</language>
      <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
      <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs>
      <generator>Weblog Editor 2.0</generator>
      <managingEditor>editor@example.com</managingEditor>
      <webMaster>webmaster@example.com</webMaster>
      <item>
         <title>Star City</title>
         <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
         <description>How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's <a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star City</a>.</description>
         <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
         <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
      </item>
      <item>
         <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a <a href="http://science.nasa.gov/headlines/y2003/30may_solareclipse.htm">partial eclipse of the Sun</a> on Saturday, May 31st.</description>
         <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>
         <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>
      </item>
      <item>
         <title>The Engine That Does More</title>
         <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>
         <description>Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly.  The proposed VASIMR engine would do that.</description>
         <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>
         <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>
      </item>
      <item>
         <title>Astronauts' Dirty Laundry</title>
         <link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>
         <description>Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them.  Instead, astronauts have other options.</description>
         <pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>
         <guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>
      </item>
   </channel>
</rss>

참고




최종 수정 : 2024-01-18