⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rss_item.asp

📁 W3Schools tutorial..web designing
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!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 &lt;channel&gt;</a><br />
<a class="left" target="_top" href="rss_item.asp" style='font-weight:bold;'>RSS &lt;item&gt;</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 &lt;item&gt; 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 &lt;item&gt; element defines an article or &quot;story&quot; in the RSS feed.</p>
<hr />

<h2>The &lt;item&gt; Element</h2>

<p>Look at the following RSS document:</p>

<table class="ex" width="100%" border="1" id="table4"><tr><td>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;
&lt;rss version=&quot;2.0&quot;&gt;</pre>
<pre>&lt;channel&gt;
  &lt;title&gt;W3Schools Home Page&lt;/title&gt;
  &lt;link&gt;http://www.w3schools.com&lt;/link&gt;
  &lt;description&gt;Free web building tutorials&lt;/description&gt;
  &lt;item&gt;
    &lt;title&gt;RSS Tutorial&lt;/title&gt;
    &lt;link&gt;http://www.w3schools.com/rss&lt;/link&gt;
    &lt;description&gt;New RSS tutorial on W3Schools&lt;/description&gt;
  &lt;/item&gt;
&lt;/channel&gt;</pre>
<pre>&lt;/rss&gt;</pre>
</td></tr></table>

<p>As mentioned before, each &lt;item&gt; element defines an article or &quot;story&quot; 
in the RSS feed.</p>
<p>
The &lt;item&gt; element has three required child elements:</p>
<ul>
	<li>&lt;title&gt; - Defines the title of the item (e.g. RSS Tutorial)</li>
	<li>&lt;link&gt; - Defines the hyperlink to the item (e.g. http://www.w3schools.com/rss)</li>
	<li>&lt;description&gt; - Describes the item (e.g. New RSS tutorial on W3Schools)</li>
</ul>

<p>Furthermore, there are several optional child elements of &lt;item&gt;. We will 
explain the most important ones below.<br />
</p>
<hr />

<h2>The &lt;author&gt; Element</h2>

<p>The &lt;author&gt; 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 &lt;author&gt; 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>&lt;author&gt;hege@refsnesdata.no&lt;/author&gt;</pre>
</td></tr></table>
<br />
<hr />

<h2>The &lt;comments&gt; Element</h2>

<p>The &lt;comments&gt; 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>&lt;comments&gt;http://www.w3schools.com/comments&lt;/comments&gt;</pre>
</td></tr></table>
<br />
<hr />

<h2>The &lt;enclosure&gt; Element</h2>

<p>The &lt;enclosure&gt; child element allows a media-file to be included with 
an item.</p>
<p>The &lt;enclosure&gt; 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>&lt;enclosure url=&quot;http://www.w3schools.com/rss/rss.mp3&quot;
length=&quot;5000&quot; type=&quot;audio/mpeg&quot; /&gt;</pre>
</td></tr></table>
<br />
<hr />

<h2>RSS &lt;item&gt; 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">&lt;author&gt;</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">&lt;category&gt;</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">&lt;comments&gt;</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 + -