contoh RSS
Contoh ini menunjukkan RSS menggunakan pembaca RSS kami.
elemen RSS <saluran>
Tetapkan pilihan elemen saluran yang diperlukan (<tajuk>, <pautan> dan <penerangan>)
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> </channel> </rss>
Run instance»
Klik butang "Run instance" untuk melihat instance dalam talian
Nyatakan kategori untuk 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>
Run Instance»
Klik butang "Run Instance" untuk melihat contoh dalam talian
Nyatakan kandungan yang digunakan untuk menjana RSS Program
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>
Run Instance»
Klik butang "Run Instance" untuk melihat contoh dalam talian
Nyatakan imej untuk 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> <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>
Run instance»
Klik "Run Butang Instance" untuk melihat Instance Dalam Talian
Tentukan bahasa untuk 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> <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>
Jalankan Instance»
Klik butang "Jalankan Instance" untuk melihat contoh dalam talian
Tambah kotak input teks untuk 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>
Jalankan Instance»
Klik butang "Run Instance" untuk melihat contoh dalam talian
Nyatakan hari apabila RSS tidak perlu dikemas kini
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> <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>
Run instance»
Klik butang "Run instance" untuk melihat instance dalam talian
Analisis contoh
RSS <item> menetapkan elemen yang diperlukan (<tajuk>, <pautan> dan <penerangan> )
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>
</item>
<item>
<title>XML Tutorial</title>
<link>http://www.w3cschool.cc/xml</link>
<description>New XML tutorial on W3Cschool</description>
</item>
</channel>
</rss>
Run instance»Klik butang "Run instance" untuk melihat instance dalam talianTambahkan pautan ulasan pada item 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>
<comments>http://www.w3cschool.cc/rss/comments.php</comments>
</item>
</channel>
</rss>
Jalankan contoh»
Klik butang "Jalankan contoh" untuk melihat contoh dalam talian
Tambahkan fail media pada projek RSS
Contoh
<?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>
Jalankan contoh»
Klik butang "Jalankan contoh" untuk melihat contoh dalam talian
Tambah pengecam unik untuk projek
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»
Klik butang "Run Instance" untuk melihat contoh dalam talian
Tambahkan maklumat keluaran pada projek 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> <pubDate>Thu, 27 Apr 2006</pubDate> </item> </channel> </rss>
Jalankan instance»
Klik butang "Jalankan Instance" untuk melihat Contoh dalam talian
Tambah pihak ketiga pada projek 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> <source url="http://www.w3cschool.cc">W3Cschool.cc</source> </item> </channel> </rss>
Jalankan contoh»
Klik butang "Jalankan Instance" untuk melihat contoh dalam talian
Analisis Instance