📄 rss_item.asp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>RSS item Element</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="stylesheet" type="text/css" href="../stdtheme.css" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<a name="top"></a>
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#808080">
<tr>
<td width="234" valign="top">
<a href="../default.htm"><img src="../images/w3default80.jpg" border="0" alt="W3Schools" /></a>
</td>
<th valign="middle" align="left" class="right">
<iframe style="background-color:#808080" src="../banners/bannerframe.asp@adpartner=aspall2" height="90" width="728"
marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<br /></th>
</tr>
</table>
<table style="margin-left:1px" width="800px" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="137" class="content" valign="top"><br />
<a class="left" href="../default.asp" target="_top">
<img src="../images/homeicon.gif" border="0" alt="home" /></a>
<a class="left" href="../default.asp" target="_top">
<b>HOME</b></a>
<br /><br />
<b>RSS Basic</b><br />
<a class="left" target="_top" href="default.asp" >RSS Home</a><br />
<a class="left" target="_top" href="rss_intro.asp" >RSS Introduction</a><br />
<a class="left" target="_top" href="rss_history.asp" >RSS History</a><br />
<a class="left" target="_top" href="rss_syntax.asp" >RSS Syntax</a><br />
<a class="left" target="_top" href="rss_channel.asp" >RSS <channel></a><br />
<a class="left" target="_top" href="rss_item.asp" style='font-weight:bold;'>RSS <item></a><br />
<a class="left" target="_top" href="rss_publishing.asp" >RSS Publish Feed</a><br />
<a class="left" target="_top" href="rss_readers.asp" >RSS Read a Feed</a><br />
<br />
<b>References</b>
<br />
<a class="left" target="_top" href="rss_reference.asp" >RSS Reference</a><br /><br />
<b>Selected Reading</b><br />
<a class="left" target="_top" href="../browsers/browsers_stats.asp">Web Statistics</a><br />
<a class="left" target="_top" href="../site/site_glossary.asp">Web Glossary</a><br />
<a class="left" target="_top" href="../hosting/default.asp">Web Hosting</a><br />
<a class="left" target="_top" href="../quality/default.asp">Web Quality</a><br /><br />
<a class="left" target="_top" href="../forum/default.asp">W3Schools Forum</a><br /><br />
<a class="left" target="_top" href="../about/about_helping.asp">Helping W3Schools</a><br /><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3440800076797949";
/*LeftLinkUnit*/
google_ad_slot = "4854527104";
google_ad_width = 120;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="../../pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<td valign="top">
<table style="border: 1px solid gray" width="100%" bgcolor="#FFFFFF" border="0" cellpadding="5" cellspacing="0">
<tr>
<td>
<h1>RSS <item> Element</h1>
<a href="rss_channel.asp"><img alt="home" border="0" src="../images/btn_previous.gif" width="100" height="20" /></a>
<a href="rss_publishing.asp"><img alt="next" border="0" src="../images/btn_next.gif" width="100" height="20" /></a>
<hr />
<p class="intro">Each <item> element defines an article or "story" in the RSS feed.</p>
<hr />
<h2>The <item> Element</h2>
<p>Look at the following RSS document:</p>
<table class="ex" width="100%" border="1" id="table4"><tr><td>
<pre><?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0"></pre>
<pre><channel>
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
</item>
</channel></pre>
<pre></rss></pre>
</td></tr></table>
<p>As mentioned before, each <item> element defines an article or "story"
in the RSS feed.</p>
<p>
The <item> element has three required child elements:</p>
<ul>
<li><title> - Defines the title of the item (e.g. RSS Tutorial)</li>
<li><link> - Defines the hyperlink to the item (e.g. http://www.w3schools.com/rss)</li>
<li><description> - Describes the item (e.g. New RSS tutorial on W3Schools)</li>
</ul>
<p>Furthermore, there are several optional child elements of <item>. We will
explain the most important ones below.<br />
</p>
<hr />
<h2>The <author> Element</h2>
<p>The <author> child element is used to specify the e-mail address of the
author of an item.</p>
<p><b>Note:</b> To prevent spam e-mails, some developers do not include the <author> element.</p>
<p>The author of the item in the RSS document above could be:</p>
<table class="ex" width="100%" border="1" id="table1"><tr><td>
<pre><author>hege@refsnesdata.no</author></pre>
</td></tr></table>
<br />
<hr />
<h2>The <comments> Element</h2>
<p>The <comments> child element allows an item to link to comments about
that item.</p>
<p>A comment of the item in the RSS document above could be:</p>
<table class="ex" width="100%" border="1" id="table2"><tr><td>
<pre><comments>http://www.w3schools.com/comments</comments></pre>
</td></tr></table>
<br />
<hr />
<h2>The <enclosure> Element</h2>
<p>The <enclosure> child element allows a media-file to be included with
an item.</p>
<p>The <enclosure> element has three required attributes:</p>
<ul>
<li>url - Defines the URL to the media file</li>
<li>length - Defines the length (in bytes) of the media file</li>
<li>type - Defines the type of media file</li>
</ul>
<p>A media-file included in the item in the RSS document above could be:</p>
<table class="ex" width="100%" border="1" id="table3"><tr><td>
<pre><enclosure url="http://www.w3schools.com/rss/rss.mp3"
length="5000" type="audio/mpeg" /></pre>
</td></tr></table>
<br />
<hr />
<h2>RSS <item> Reference</h2>
<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th align="left" valign="top" width="30%">Element</th>
<th align="left" valign="top" width="70%">Description</th>
</tr>
<tr>
<td valign="top"><a href="rss_tag_author.asp"><author></a></td>
<td valign="top">Optional. Specifies the e-mail address to the author of the
item</td>
</tr>
<tr>
<td valign="top"><a href="rss_tag_category_item.asp"><category></a></td>
<td valign="top">Optional. Defines one or more categories the item belongs to</td>
</tr>
<tr>
<td valign="top"><a href="rss_tag_comments.asp"><comments></a></td>
<td valign="top">Optional. Allows an item to link to comments about that item</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -