ວິນຍາ RSS
- ບ່ອນຫນ້າກ່ອນ ປະຫວັດສາດ RSS
- ບ່ອນຫນ້ານັ້ນ RSS <channel>
The syntax of RSS 2.0 is simple and strict. These rules are easy to learn and easy to use.
How RSS works
RSS is used to share information between websites.
Using RSS, you register your content with the company named the aggregator.
One of the steps is to create an RSS document and then save it with the .xml suffix. Then upload this file to your website. Next, register through an RSS aggregator. Every day, the aggregator will search for registered RSS documents on the website, verify the links, and display information about the feed so that customers can link to documents that interest them.
Tip:Please in RSS publishing This section explores free RSS aggregator services.
An RSS instance document
RSS document uses a simple self-describing syntax:
ພວກເຮົາຈະເບິ່ງເອກະສານ RSS ທີ່ພຽງພໍ:
<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0"> <channel> <title>CodeW3C.com Home Page</title> <link>http://www.codew3c.com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http://www.codew3c.com/rss</link> <description>New RSS tutorial on CodeW3C.com</description> </item> <item> <title>XML Tutorial</title> <link>http://www.codew3c.com/xml</link> <description>New XML tutorial on CodeW3C.com</description> </item> </channel> </rss>
ການຂຽນທີ່ທໍາອິດຂອງເອກະສານ: XML declaration - ກໍານົດເອກະສານ XML ແລະ ຄວາມຮັບຮູບຂອງຄວາມ. ບົດສະຫຼົບນີ້ຕາມຄວາມສັນຍາ 1.0 ແລະ ນໍາໃຊ້ຄອມພິມີໂອບ ISO-8859-1 (Latin-1/West European)。
ບໍ່ດັງຖອຍດິນຈະແຈ້ງວ່າເອກະສານນີ້ເປັນເອກະສານ RSS (ບົດສະຫຼົບ RSS version 2.0)。
下一行含有
- 定义频道的标题。(比如 CodeW3C 首页) - - 定义到达频道的超链接。(比如 www.codew3c.com)
- <description> - ອະທິບາຍເປົ້າຫົວ (ອີງຕາມຄູ່ມືການກໍ່ສ້າງເວັບໄຊບໍ່ເສຍຄ່າ)
ແຕ່ລະຫົວຂໍ້ <channel> ສາມາດມີໜຶ່ງຫນື່ງຫນື່ງຫົວຂໍ້ <item>.
ແຕ່ລະຫົວຂໍ້ <item> ສາມາດກໍານົດຫົວຂໍ້ຫນື່ງຫນື່ງຂອງ RSS feed.
ຫົວຂໍ້ <item> ມີສາມຫົວຂໍ້ທີ່ຈຳກັດ:
- <title> - ກໍານົດຫົວຂໍ້ເປົ້າຫົວ (ອີງຕາມ RSS Tutorial)
- <link> - ກໍານົດການທີ່ຈະໄປເຖິງເປົ້າຫົວ (ອີງຕາມ http://www.codew3c.com/rss)
- <description> - ອະທິບາຍເປົ້າຫົວ (ອີງຕາມ CodeW3C RSS Tutorial)
ສຸດທ້າຍ, ສອງປະໂຫຍດທີ່ຫນຶ່ງຫນັງຈະປິດຫົວຂໍ້ <channel> ແລະ <rss>.
ຄວາມຄິດ RSS
ວິນຍາການຂຽນຄວາມຄິດໃນ RSS ຄືກັບວິນຍາການຂຽນໃນ HTML:
<!-- This is an RSS comment -->
RSS ນຳໃຊ້ XML ເພື່ອຂຽນ
ຍ້ອນ RSS ກໍ່ແມ່ນ XML, ບັນທຶກວ່າ:
- ທຸກຫົວຂໍ້ຕ້ອງມີກາກປິດ
- ຫົວຂໍ້ກະຈາຍຄວາມຈະຮູບຮ່າງຂອງພາສາ
- ຫົວຂໍ້ຕ້ອງຖືກຈອງຢ່າງຖືກຕ້ອງ
- ຄວາມຜູກມັດຄວາມຜູກມັດຕ້ອງມີກາກ
- ບ່ອນຫນ້າກ່ອນ ປະຫວັດສາດ RSS
- ບ່ອນຫນ້ານັ້ນ RSS <channel>