RSS 효율적인 입문 튜토리...로그인
RSS 효율적인 입문 튜토리얼
작가:php.cn  업데이트 시간:2022-04-11 14:48:25

RSS 예


이 예제에서는 RSS 리더를 사용하여 RSS를 보여줍니다.

RSS <channel> 요소

채널 요소의 필수 옵션 설정(<title>, <link> 및 <description>)

Example

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
</channel>
</rss>

예제 실행»

클릭" 온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요.

RSS 카테고리를 지정하세요. 프로그램

Instance

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <category>IT/Internet/Web development</category>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
    <category>News</category>
    <category>Tutorial</category>
  </item>
</channel>
</rss>

인스턴스 실행»온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요.

RSS에 이미지 지정

Instance

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <generator>Notepad</generator>
    <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
  </item>
</channel>
</rss>

인스턴스 실행» 온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요

RSS용 언어 지정

Example

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <image>
    <url>http://www.w3cschool.cc/images/logo.png</url>
    <title>W3Cschool.cc</title>
    <link>http://www.w3cschool.cc</link>
  </image>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
  </item>
</channel>
</rss>

인스턴스 실행»온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요

RSS용 텍스트 입력 상자 추가

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <language>en-us</language>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
  </item>
</channel>
</rss>

인스턴스 실행»온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요.

RSS를 업데이트할 필요가 없는 날짜를 지정하세요

Instance

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <textinput>
    <description>Search Google</description>
    <title>Search</title>
    <link>http://www.google.no/search?</link>
    <name>q</name>
  </textinput>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
  </item>
</channel>
</rss>

인스턴스 실행»온라인 예제를 보려면 "인스턴스 실행" 버튼을 클릭하세요

예제 분석

RSS <item> 요소

필수 옵션 설정(<제목> , <링크> 및 <설명>)

Example

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <skipDays>
    <day>Saturday</day>
    <day>Sunday</day>
  </skipDays>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
  </item>
</channel>
</rss>

예제 실행»온라인 예제를 보려면 "예제 실행" 버튼을 클릭하세요

RSS 항목에 댓글 링크 추가

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
  </item>
  <item>
    <title>XML Tutorial</title>
    <link>http://www.w3cschool.cc/xml</link>
    <description>New XML tutorial on W3Cschool</description>
  </item>
</channel>
</rss>

인스턴스 실행»

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요.

RSS 프로젝트에 미디어 파일 추가

Instance

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
    <comments>http://www.w3cschool.cc/rss/comments.php</comments>
  </item>
</channel>
</rss>

인스턴스 실행»

"인스턴스 실행"을 클릭하세요. 온라인 인스턴스를 보려면 버튼

프로젝트에 고유 식별자를 추가하세요

Instance

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
    <enclosure url="http://www.w3cschool.cc/media/3d.wmv"
    length="78645" type="video/wmv" />
  </item>
</channel>
</rss>

인스턴스 실행»

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요

게시 정보 추가 RSS 프로젝트

Instance

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
    <guid>http://www.w3cschool.cc/rss/item0768</guid>
  </item>
</channel>
</rss>

Run Instance»

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요.

RSS 프로젝트에 타사

인스턴스 추가

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Edited by XMLSpy® -->
<rss version="2.0">
<channel>
  <title>W3Cschool Home Page</title>
  <link>http://www.w3cschool.cc</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3cschool.cc/rss</link>
    <description>New RSS tutorial on W3Cschool</description>
    <pubDate>Thu, 27 Apr 2006</pubDate>
  </item>
</channel>
</rss>

인스턴스 실행»

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요

예제 분석