<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[小Tan - 网站]]></title>
<link>http://jefftan.cn/blog/</link>
<description><![CDATA[张开翅膀飞翔]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[jefftan@163.com(小Tan)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>小Tan</title>
	<url>http://jefftan.cn/blog/images/logos.gif</url>
	<link>http://jefftan.cn/blog/</link>
	<description>小Tan</description>
</image>

			<item>
			<link>http://jefftan.cn/blog/article/web/131.htm</link>
			<title><![CDATA[迅雷看看境外用户无法访问解决方法]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Sat,07 Mar 2009 11:05:10 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=131</guid>
		<description><![CDATA[最近境外用户无法正常收看迅雷看看，疑似被迅雷封了。不过其实后很简单的方法解决。而且只需要一次操作即可。<br/><br/>把C:\WINDOWS\system32\drivers\etc目录下的hosts文件用记事本打开，在文件最后添加如下行：<br/>119.147.41.50 kankan.xunlei.com<br/><br/>保存关闭，然后重启浏览器<br/><br/>Enjoy～]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/93.htm</link>
			<title><![CDATA[RSS2.0中如何生成标准的pubDate格式]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Sun,27 Apr 2008 16:11:27 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=93</guid>
		<description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;在制作网站或博客的feed时，pubDate是一个非常重要的一项，它记录了文章发布的时间。这无论是对订阅者还是搜索引擎来说都是非常重要的。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;对于RSS2.0标准下的时间格式要求比较严格，必须遵守rfc822标准。比如&lt;pubDate&gt;Fri, 22 Feb 2008 15:49:18 GMT&lt;/pubDate&gt;这样的格式。而一般的国内的服务器时间都是形如2008-2-22 15:49:18这样的格式，显然不满足标准，这也是导致很多feed读取不到文章发表时间的原因。<br/><br/>&nbsp;&nbsp; 在RSS1.0和ATOM当中，对于时间的格式并没有非常严格的规定，例如“2008-2-22 15:49:18”这样的格式是完全可以被识别的。但在RSS2.0中，这种时间格式就不能被识别。在ASP程序中，时间无法直接转换成满足rfc822标准的格式，所以很多博客系统直接采用了默认的时间格式。<br/><br/>&nbsp;&nbsp; 其实通过一个小函数，就可以完美转换符合标准的时间函数了。以下引用“呆若木鸡”写的一个函数：<br/><br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent">&#39;时间转换函数,符合rfc822标准<br/>Function return_RFC822_Date(byVal myDate, byVal TimeZone) <br/> Dim myDay, myDays, myMonth, myYear <br/> Dim myHours, myMinutes, mySeconds&nbsp;&nbsp;<br/> myDate = CDate(myDate) <br/> myDay = EnWeekDayName(myDate) <br/> myDays = Right(&#34;00&#34; &amp; Day(myDate),2) <br/> myMonth = EnMonthName(myDate) <br/> myYear = Year(myDate) <br/> myHours = Right(&#34;00&#34; &amp; Hour(myDate),2) <br/> myMinutes = Right(&#34;00&#34; &amp; Minute(myDate),2) <br/> mySeconds = Right(&#34;00&#34; &amp; Second(myDate),2) <br/> return_RFC822_Date = myDay&amp;&#34;, &#34;&amp; _ <br/> myDays&amp;&#34; &#34;&amp; _ <br/> myMonth&amp;&#34; &#34;&amp; _ <br/> myYear&amp;&#34; &#34;&amp; _ <br/> myHours&amp;&#34;:&#34;&amp; _ <br/> myMinutes&amp;&#34;:&#34;&amp; _ <br/> mySeconds&amp;&#34; &#34;&amp; _ <br/> &#34; &#34; &amp; TimeZone <br/> End Function <br/>&#39;星期转换函数<br/>Function EnWeekDayName(InputDate) <br/> Dim Result <br/> Sel&#101;ct Case WeekDay(InputDate,1) <br/> Case 1:Result=&#34;Sun&#34; <br/> Case 2:Result=&#34;Mon&#34; <br/> Case 3:Result=&#34;Tue&#34; <br/> Case 4:Result=&#34;Wed&#34; <br/> Case 5:Result=&#34;Thu&#34; <br/> Case 6:Result=&#34;Fri&#34; <br/> Case 7:Result=&#34;Sat&#34; <br/> End Sel&#101;ct <br/> EnWeekDayName = Result <br/>End Function <br/>&#39;月份转换函数<br/>Function EnMonthName(InputDate) <br/> Dim Result <br/> Sel&#101;ct Case Month(InputDate) <br/> Case 1:Result=&#34;Jan&#34; <br/> Case 2:Result=&#34;Feb&#34; <br/> Case 3:Result=&#34;Mar&#34; <br/> Case 4:Result=&#34;Apr&#34; <br/> Case 5:Result=&#34;May&#34; <br/> Case 6:Result=&#34;Jun&#34; <br/> Case 7:Result=&#34;Jul&#34; <br/> Case 8:Result=&#34;Aug&#34; <br/> Case 9:Result=&#34;Sep&#34; <br/> Case 10:Result=&#34;Oct&#34; <br/> Case 11:Result=&#34;Nov&#34; <br/> Case 12:Result=&#34;Dec&#34; <br/> End Sel&#101;ct <br/> EnMonthName = Result <br/>End Function </div></div><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;通过上面的这个asp函数，就可以简单实现时间的转换。<br/><br/>&nbsp;&nbsp; 但是，这里一些博客系统的rss在Feedsky烧制后出现了问题。就是时间在烧制后提前了8个小时。举例说明，某文章的发表时间是Fri, 22 Feb 2008 15:49:18 GMT；在Feedsky烧制的页面中却提前了8小时，变成Fri, 22 Feb 2008 23:49:18 +0800。可以看出，Feedsky把GMT变成+0800，提前8个小时。<br/><br/>&nbsp;&nbsp; 看了一下rfc822标准里关于时区的解释：<br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent">&nbsp;&nbsp; zone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;&#34;UT&#34;&nbsp;&nbsp;/ &#34;GMT&#34;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; Universal Time<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; North American : UT<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&#34;EST&#34; / &#34;EDT&#34;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;&nbsp;Eastern:&nbsp;&nbsp;- 5/ - 4<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&#34;CST&#34; / &#34;CDT&#34;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;&nbsp;Central:&nbsp;&nbsp;- 6/ - 5<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&#34;MST&#34; / &#34;MDT&#34;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;&nbsp;Mountain: - 7/ - 6<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;&#34;PST&#34; / &#34;PDT&#34;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;&nbsp;Pacific:&nbsp;&nbsp;- 8/ - 7<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&nbsp;&nbsp;1ALPHA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Military: Z = UT;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;A:-1; (J not used)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;M:-12; N:+1; Y:+12<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; / ( (&#34;+&#34; / &#34;-&#34;) 4DIGIT )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; Local differential<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;hours+min. (HHMM)</div></div><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;问题就出在了网站或博客的时间采用了GMT，而中国采用的时间是北京时间，即东8区。整个地球分为二十四时区，每个时区都有自己的本地时间。在国际无线电通信场合，为了统一起见，使用一个统一的时间，称为通用协调时(UTC, Universal Time Coordinated)。UTC与格林尼治平均时(GMT, Greenwich Mean Time)一样，都与英国伦敦的本地时相同，UTC与GMT含义完全相同。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;所以，只要把博客的时间采用东八区就可以了。可以调用这样的形式，return_RFC822_Date(&#34;&amp;rs(&#34;时间字段&#34;)&amp;&#34;,&#34;+0800&#34;)，就可以了，问题解决了。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;最后对像我一样的菜鸟们多说一句，函数在asp中需要用&lt;%和%&gt;注释，否则会直接显示在网页中，无意义。而调用时同样需要&lt;%=return_RFC822_Date(...)%&gt;才能输出值哦o(∩_∩)o...]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/85.htm</link>
			<title><![CDATA[同时适用于Firefox和IE的WMP音乐播放器嵌入代码]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Mon,21 Apr 2008 00:26:09 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=85</guid>
		<description><![CDATA[一个音频嵌入文件在Firefox和IE都能播放是非常重要的，毕竟这两款播放器都有很多用户。WMP在IE上的支持是没有问题的，但是在Firefox上就不那么好了。<br/><br/>用户要想在Firefox上使用WMP的嵌入试听，必须安装相关的插件。具体的插件在<a href="http://jefftan.cn/download" target="_blank">下载</a>天地中可以<a href="http://jefftan.cn/download" target="_blank">下载</a>，地址是<a target="_blank" href="http://jefftan.cn/download/soft.asp?id=10119" rel="external">http://jefftan.cn/download/soft.asp?id=10119</a>。<br/><br/>即便是用户安装了相关插件，在网页编写上也需要一些方法来使得一组代码就可以同时被两种浏览器成功解析。下面给出一组可行的方法。<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">&lt;object border=&#34;0&#34; align=&#34;bottom&#34; codebase=&#34;<a href="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab" target="_blank" rel="external">http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab</a>#Version=6,4,7,1112&#34; type=&#34;application/x-oleobject&#34; height=&#34;64&#34; id=&#34;MediaPlayer1&#34; standby=&#34;Loading Microsoft Windows Media Player components...&#34; width=&#34;215&#34; classid=&#34;CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6&#34;&gt;<br/>&lt;param value=&#34;<a href="http://davidmosla.googlepages.com/BackgroundSoundtrack.wma" target="_blank" rel="external">http://davidmosla.googlepages.com/BackgroundSoundtrack.wma</a>&#34; name=&#34;URL&#34;/&gt;<br/>&lt;param value=&#34;true&#34; name=&#34;autoStart&#34;/&gt;<br/>&lt;param value=&#34;false&#34; name=&#34;invokeURLs&#34;/&gt;<br/>&lt;param value=&#34;100&#34; name=&#34;playCount&#34;/&gt;<br/>&lt;param value=&#34;datawindow&#34; name=&#34;defaultFrame&#34;/&gt;<br/>&lt;embed autostart=&#34;1&#34; clicktoplay=&#34;0&#34; width=&#34;215&#34; showaudiocontrols=&#34;1&#34; autorewind=&#34;0&#34; autosize=&#34;0&#34; name=&#34;MediaPlayer1&#34; showcontrols=&#34;1&#34; align=&#34;bottom&#34; showstatusbar=&#34;1&#34; showdisplay=&#34;0&#34; animationatstart=&#34;0&#34; src=&#34;<a href="http://davidmosla.googlepages.com/BackgroundSoundtrack.wma" target="_blank" rel="external">http://davidmosla.googlepages.com/BackgroundSoundtrack.wma</a>&#34; showtracker=&#34;1&#34; transparentatstart=&#34;0&#34; type=&#34;application/x-mplayer2&#34; showgotobar=&#34;0&#34; pluginspage=&#34;&#34; height=&#34;64&#34; defaultframe=&#34;datawindow&#34; border=&#34;0&#34; showcaptioning=&#34;0&#34; enablecontextmenu=&#34;1&#34; showpositioncontrols=&#34;0&#34; allowscan=&#34;1&#34; invokeurls=&#34;0&#34;&gt;&lt;/embed&gt;<br/>&lt;/object&gt;</div></div><br/><br/>OK，就这样，播放器成功嵌入，在IE和带有WMP插件的FF上都能播放啦~~]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/84.htm</link>
			<title><![CDATA[CSS样式在IE和Firefox浏览器中的差异和兼容性编辑对策]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Mon,21 Apr 2008 00:06:07 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=84</guid>
		<description><![CDATA[在使用CSS+DIV网页布局时，你会发现有时网页结构在Firefox上运行正常，但在IE上就出现了混乱。或者出现相反的情况。造成这种差异的原因是两个浏览器对于CSS样式的代码不太相同，因此可能出现FF能够认识而IE却无法识别的样式，导致混乱的出现。<br/><br/>我们希望自己的网页能够尽量的兼容不同的浏览区，因此，在设计样式表时需要有以下的一些方法来避免这种问题，让网页如愿兼容IE和FF。<br/><br/><strong>1 针对firefox ie6 ie7的css样式</strong><br/><br/>现在大部分都是用!important来hack，对于ie6和firefox测试可以正常显示，但是ie7对!important可以正确解释，会导致页面没按要求显示！找到一个针对IE7不错的hack方式就是使用“*+html”，现在用IE7浏览一下，应该没有问题了。<br/><br/>现在写一个CSS可以这样：<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#1 { color: #333; } /* Moz */<br/>* html #1 { color: #666; } /* IE6 */<br/>*+html #1 { color: #999; } /* IE7 */</div></div><br/><br/>那么在firefox下字体颜色显示为#333，IE6下字体颜色显示为#666，IE7下字体颜色显示为#999。<br/><br/><strong>2 css布局中的居中问题</strong><br/><br/>主要的样式定义如下：<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">body {TEXT-ALIGN: center;}<br/>#center { MARGIN-RIGHT: auto; MARGIN-LEFT: auto; }</div></div><br/><br/>说明：<br/><br/>首先在父级元素定义TEXT-ALIGN: center;这个的意思就是在父级元素内的内容居中；对于IE这样设定就已经可以了。<br/><br/>但在mozilla中不能居中。解决办法就是在子元素定义时候设定时再加上“MARGIN-RIGHT: auto;MARGIN-LEFT: auto; ”<br/><br/>需要说明的是，如果你想用这个方法使整个页面要居中，建议不要套在一个DIV里，你可以依次拆出多个div，只要在每个拆出的div里定义MARGIN-RIGHT: auto;MARGIN-LEFT: auto; 就可以了。<br/><br/><strong>3&nbsp;&nbsp;盒模型不同解释.</strong><br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#box{<br/>&nbsp;&nbsp; width:600px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//for&nbsp;&nbsp; ie6.0-&nbsp;&nbsp; w\idth:500px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //for&nbsp;&nbsp;ff+ie6.0<br/>}<br/>#box{<br/>&nbsp;&nbsp; width:600px!important<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//for ff<br/>&nbsp;&nbsp;&nbsp;&nbsp;width:600px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//for&nbsp;&nbsp;ff+ie6.0<br/>&nbsp;&nbsp;&nbsp;&nbsp;width /**/:500px;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //for&nbsp;&nbsp; ie6.0-<br/>}</div></div><br/><br/><strong>4 浮动ie产生的双倍距离</strong><br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#box{&nbsp;&nbsp; float:left;&nbsp;&nbsp; width:100px;&nbsp;&nbsp; margin:0 0 0 100px;&nbsp;&nbsp;//这种情况之下IE会产生200px的距离<br/>display:inline;&nbsp;&nbsp; //使浮动忽略}</div></div><br/><br/>这里细说一下block,inline两个元素,Block元素的特点是:总是在新行上开始,高度,宽度,行高,边距都可以控制(块元素);Inline元素的特点是:和其他元素在同一行上,...不可控制(内嵌元素);<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#box{&nbsp;&nbsp; display:block; //可以为内嵌元素模拟为块元素&nbsp;&nbsp; <br/>display:inline; //实现同一行排列的的效果&nbsp;&nbsp; <br/>diplay:table;}</div></div><br/><br/><strong>5 IE与宽度和高度的问题</strong><br/><br/>IE不认得min-这个定义，但实际上它把正常的width和height当作有min的情况来使。这样问题就大了，如果只用宽度和高度，正常的浏览器里这两个值就不会变，如果只用min-width和min-height的话，IE下面根本等于没有设置宽度和高度。比如要设置背景图片，这个宽度是比较重要的。要解决这个问题，可以这样：<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#box{&nbsp;&nbsp;&nbsp;&nbsp;width: 80px;&nbsp;&nbsp;&nbsp;&nbsp;height: 35px;}html&gt;body #box{&nbsp;&nbsp;&nbsp;&nbsp;width: auto;&nbsp;&nbsp;&nbsp;&nbsp;height: auto;&nbsp;&nbsp;&nbsp;&nbsp;min-width: 80px;&nbsp;&nbsp;&nbsp;&nbsp;min-height: 35px;}</div></div><br/><br/><strong>6 页面的最小宽度</strong><br/><br/>min-width是个非常方便的CSS命令，它可以指定元素最小也不能小于某个宽度，这样就能保证排版一直正确。但IE不认得这个，而它实际上把 width当做最小宽度来使。为了让这一命令在IE上也能用，可以把一个&lt;div&gt; 放到 &lt;body&gt; 标签下，然后为div指定一个类：<br/>然后CSS这样设计：<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#container{<br/>&nbsp;&nbsp;min-width: 600px;<br/>&nbsp;&nbsp;width:e&amp;shy;xpression(document.body.clientWidth &lt; 600? &#34;600px&#34;: &#34;auto&#34; );<br/>}</div></div><br/><br/>第一个min-width是正常的；但第2行的width使用了Javascript，这只有IE才认得，这也会让你的HTML文档不太正规。它实际上通过Javascript的判断来实现最小宽度。<br/><br/><strong>7 清除浮动</strong><br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">.hackbox{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; display:table;<br/>//将对象作为块元素级的表格显示<br/>}</div></div><br/><br/>或者<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">.hackbox{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clear:both;<br/>}</div></div><br/><br/>或者加入:after（伪对象）,设置在对象后发生的内容，通常和content配合使用，IE不支持此伪对象，非Ie 浏览器支持，所以并不影响到IE/WIN浏览器。这种的最麻烦的<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">......<br/>#box:after{<br/>&nbsp;&nbsp;&nbsp;&nbsp;content: &#34;.&#34;;<br/>&nbsp;&nbsp;&nbsp;&nbsp; display: block;<br/>&nbsp;&nbsp;&nbsp;&nbsp;height: 0;<br/>&nbsp;&nbsp;&nbsp;&nbsp; clear: both;<br/>&nbsp;&nbsp;&nbsp;&nbsp; visibility: hidden;<br/>}</div></div><br/><br/><strong>8 DIV浮动IE文本产生3象素的bug</strong><br/><br/>左边对象浮动，右边采用外补丁的左边距来定位，右边对象内的文本会离左边有3px的间距.<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#box{<br/>&nbsp;&nbsp;&nbsp;&nbsp;float:left;<br/>&nbsp;&nbsp;&nbsp;&nbsp;width:800px;}<br/>#left{<br/>&nbsp;&nbsp;&nbsp;&nbsp;float:left;<br/>&nbsp;&nbsp;&nbsp;&nbsp;width:50%;}<br/>#right{<br/>&nbsp;&nbsp;&nbsp;&nbsp;width:50%;<br/>}<br/>*html #left{<br/>&nbsp;&nbsp;&nbsp;&nbsp;margin-right:-3px;<br/>&nbsp;&nbsp; //这句是关键<br/>}</div></div><br/>HTML代码<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">&lt;DIV id=box&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;DIV id=left&gt;&lt;/DIV&gt;<br/>&nbsp;&nbsp; &lt;DIV id=right&gt;&lt;/DIV&gt;<br/>&lt;/DIV&gt;</div></div><br/><br/><strong>9 属性选择器(这个不能算是兼容,是隐藏css的一个bug)</strong><br/><br/>p[id]{}div[id]{}<br/>p[id]{}div[id]{}<br/><br/>这个对于IE6.0和IE6.0以下的版本都隐藏,FF和OPera作用<br/><br/>属性选择器和子选择器还是有区别的,子选择器的范围从形式来说缩小了,属性选择器的范围比较大,如p[id]中,所有p标签中有id的都是同样式的.<br/><br/><strong>10 IE捉迷藏的问题</strong><br/><br/>&nbsp;&nbsp; 当div应用复杂的时候每个栏中又有一些链接，DIV等这个时候容易发生捉迷藏的问题。<br/>有些内容显示不出来，当鼠标选择这个区域是发现内容确实在页面。<br/>解决办法：对#layout使用line-height属性 或者给#layout使用固定高和宽。页面结构尽量简单。<br/><br/><strong>11 高度不适应</strong><br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;高度不适应是当内层对象的高度发生变化时外层高度不能自动进行调节，特别是当内层对象使用<br/>margin 或paddign 时。例：<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">&lt;div id=&#34;box&#34;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &lt;p&gt;p对象中的内容&lt;/p&gt;<br/>&nbsp;&nbsp; &lt;/div&gt;</div></div><br/><br/>CSS：<br/><br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">#box {background-color:#eee; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>#box p {margin-top: 20px;margin-bottom: 20px; text-align:center; }</div></div><br/><br/>解决方法：在P对象上下各加2个空的div对象CSS代码：.1{height:0px;overflow:hidden;}或者为DIV加上border属性。]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/74.htm</link>
			<title><![CDATA[RSS 2.0 规范标准]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Sun,06 Apr 2008 10:59:54 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=74</guid>
		<description><![CDATA[<div class="specification">
<h3>RSS 2.0 Specification</h3>
<p class="fineprint">Archivist's Note: This is version 2.0.10 of the RSS 2.0 specification, published by the RSS Advisory Board on Oct. 15, 2007. The current version of the RSS spec will always be available at <a href="http://www.rssboard.org/rss-specification"><strong><font color="#924547">this link</font></strong></a>, all changes have been <a href="http://www.rssboard.org/rss-change-notes"><strong><font color="#920011">logged</font></strong></a> and <a href="http://www.rssboard.org/rss-history"><strong><font color="#920011">other revisions</font></strong></a> have been archived.</p>
<h4>Contents</h4>
<ul>
    <li><a href="http://jefftan.cn/blog/#whatIsRss"><strong><font color="#920011">What is RSS?</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#sampleFiles"><strong><font color="#920011">Sample files</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#aboutThisDocument"><strong><font color="#920011">About this document</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#requiredChannelElements"><strong><font color="#920011">Required channel elements</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#optionalChannelElements"><strong><font color="#920011">Optional channel elements</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#hrelementsOfLtitemgt"><strong><font color="#920011">Elements of &lt;item&gt;</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#comments"><strong><font color="#920011">Comments</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#extendingRss"><strong><font color="#920011">Extending RSS</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#roadmap"><strong><font color="#920011">Roadmap</font></strong></a> </li>
    <li><a href="http://jefftan.cn/blog/#licenseAndAuthorship"><strong><font color="#920011">License and authorship</font></strong></a> </li>
</ul>
<h4>What is RSS?<a name="whatIsRss"></a> <a title="What is RSS?" href="http://jefftan.cn/blog/#whatIsRss"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>RSS is a Web content syndication format.</p>
<p>Its name is an acronym for <i><b>R</b>eally <b>S</b>imple <b>S</b>yndication.</i></p>
<p>RSS is a dialect of XML. All RSS files must conform to the XML 1.0 <a href="http://www.w3.org/TR/REC-xml"><strong><font color="#920011">specification</font></strong></a>, as published on the World Wide Web Consortium (W3C) website.</p>
<p>A summary of <a href="http://www.rssboard.org/rss-history"><strong><font color="#920011">RSS version history</font></strong></a>.</p>
<p>At the top level, a RSS document is a &lt;rss&gt; element, with a mandatory attribute called version, that specifies the version of RSS that the document conforms to. If it conforms to this specification, the version attribute must be 2.0.</p>
<p>Subordinate to the &lt;rss&gt; element is a single &lt;channel&gt; element, which contains information about the channel (metadata) and its contents.</p>
<h4>Sample files<a name="sampleFiles"></a> <a title="Sample files" href="http://jefftan.cn/blog/#sampleFiles"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>Here are sample files for: RSS <a href="http://www.rssboard.org/files/sample-rss-091.xml"><strong><font color="#920011">0.91</font></strong></a>, <a href="http://www.rssboard.org/files/sample-rss-092.xml"><strong><font color="#920011">0.92</font></strong></a> and <a href="http://www.rssboard.org/files/sample-rss-2.xml"><strong><font color="#920011">2.0</font></strong></a>.</p>
<p>Note that the sample files may point to documents and services that no longer exist. The 0.91 sample was created when the 0.91 docs were written. Maintaining a trail of samples seems like a good idea.</p>
<h4>About this document<a name="aboutThisDocument"></a> <a title="About this document" href="http://jefftan.cn/blog/#aboutThisDocument"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>This document represents the status of RSS as of the Fall of 2002, version 2.0.1.</p>
<p>It incorporates all changes and additions, starting with the basic spec for <a href="http://www.rssboard.org/rss-0-9-1"><strong><font color="#920011">RSS 0.91</font></strong></a> (June 2000) and includes new features introduced in <a href="http://www.rssboard.org/rss-0-9-2"><strong><font color="#920011">RSS 0.92</font></strong></a> (December 2000) and RSS 0.94 (August 2002).</p>
<p>Change notes are <a href="http://www.rssboard.org/rss-change-notes"><strong><font color="#920011">here</font></strong></a>.</p>
<p>First we document the required and optional sub-elements of &lt;channel&gt;; and then document the sub-elements of &lt;item&gt;. The final sections answer frequently asked questions, and provide a roadmap for future evolution, and guidelines for extending RSS.</p>
<p>The <a href="http://www.rssboard.org/rss-profile"><strong><font color="#920011">RSS Profile</font></strong></a> contains a set of recommendations for how to create RSS documents that work best in the wide and diverse audience of client software that supports the format.</p>
<h4>Required channel elements<a name="requiredChannelElements"></a> <a title="Required channel elements" href="http://jefftan.cn/blog/#requiredChannelElements"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>Here's a list of the required channel elements, each with a brief description, an example, and where available, a pointer to a more complete description.</p>
<table cellspacing="10">
    <tbody>
        <tr valign="top">
            <td>Element</td>
            <td width="45%">Description</td>
            <td>Example</td>
        </tr>
        <tr valign="top">
            <td><span class="element">title</span></td>
            <td>The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.</td>
            <td class="examplecell">GoUpstate.com News Headlines</td>
        </tr>
        <tr valign="top">
            <td><span class="element">link</span></td>
            <td>The URL to the HTML website corresponding to the channel.</td>
            <td class="examplecell">http://www.goupstate.com/</td>
        </tr>
        <tr valign="top">
            <td><span class="element">description</span></td>
            <td>Phrase or sentence describing the channel.</td>
            <td class="examplecell">The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site.</td>
        </tr>
    </tbody>
</table>
<h4>Optional channel elements<a name="optionalChannelElements"></a> <a title="Optional channel elements" href="http://jefftan.cn/blog/#optionalChannelElements"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>Here's a list of optional channel elements.</p>
<table cellspacing="10">
    <tbody>
        <tr valign="top">
            <td>Element</td>
            <td width="65%">Description</td>
            <td>Example</td>
        </tr>
        <tr valign="top">
            <td><span class="element">language</span></td>
            <td>The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is <a href="http://www.rssboard.org/rss-language-codes"><strong><font color="#920011">here</font></strong></a>. You may also use <a href="http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes"><strong><font color="#920011">values defined</font></strong></a> by the W3C.</td>
            <td class="examplecell">en-us</td>
        </tr>
        <tr valign="top">
            <td><span class="element">copyright</span></td>
            <td>Copyright notice for content in the channel.</td>
            <td class="examplecell">Copyright 2002, Spartanburg Herald-Journal</td>
        </tr>
        <tr valign="top">
            <td><span class="element">managingEditor</span></td>
            <td>Email address for person responsible for editorial content.</td>
            <td class="examplecell">geo@herald.com (George Matesky)</td>
        </tr>
        <tr valign="top">
            <td><span class="element">webMaster</span></td>
            <td>Email address for person responsible for technical issues relating to channel.</td>
            <td class="examplecell">betty@herald.com (Betty Guernsey)</td>
        </tr>
        <tr valign="top">
            <td><span class="element">pubDate</span></td>
            <td>The publication date for the content in the channel. For example, the <i>New York Times</i> publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of <a href="http://asg.web.cmu.edu/rfc/rfc822.html"><strong><font color="#920011">RFC 822</font></strong></a>, with the exception that the year may be expressed with two characters or four characters (four preferred).</td>
            <td class="examplecell">Sat, 07 Sep 2002 00:00:01 GMT</td>
        </tr>
        <tr valign="top">
            <td><span class="element">lastBuildDate</span></td>
            <td>The last time the content of the channel changed.</td>
            <td class="examplecell">Sat, 07 Sep 2002 09:42:31 GMT</td>
        </tr>
        <tr valign="top">
            <td><span class="element">category</span></td>
            <td>Specify one or more categories that the channel belongs to. Follows the same rules as the &lt;item&gt;-level <a href="http://jefftan.cn/blog/#ltcategorygtSubelementOfLtitemgt"><strong><font color="#920011">category</font></strong></a> element. More <a href="http://jefftan.cn/blog/#syndic8"><strong><font color="#920011">info</font></strong></a>.</td>
            <td class="examplecell">&lt;category&gt;Newspapers&lt;/category&gt;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">generator</span></td>
            <td>A string indicating the program used to generate the channel.</td>
            <td class="examplecell">MightyInHouse Content System v2.3</td>
        </tr>
        <tr valign="top">
            <td><span class="element">docs</span></td>
            <td>A URL that points to the <a href="http://www.rssboard.org/rss-specification"><strong><font color="#924547">documentation</font></strong></a> for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.</td>
            <td class="examplecell">http://www.rssboard.org/rss-specification</td>
        </tr>
        <tr valign="top">
            <td><span class="element">cloud</span></td>
            <td>Allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. More info <a href="http://jefftan.cn/blog/#ltcloudgtSubelementOfLtchannelgt"><strong><font color="#920011">here</font></strong></a>.</td>
            <td class="examplecell">&lt;cloud domain=&quot;rpc.sys.com&quot; port=&quot;80&quot; path=&quot;/RPC2&quot; registerProcedure=&quot;pingMe&quot; protocol=&quot;soap&quot;/&gt;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">ttl</span></td>
            <td>ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. More info <a href="http://jefftan.cn/blog/#ltttlgtSubelementOfLtchannelgt"><strong><font color="#920011">here</font></strong></a>.</td>
            <td class="examplecell">&lt;ttl&gt;60&lt;/ttl&gt;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">image</span></td>
            <td>Specifies a GIF, JPEG or PNG image that can be displayed with the channel. More info <a href="http://jefftan.cn/blog/#ltimagegtSubelementOfLtchannelgt"><strong><font color="#920011">here</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">rating</span></td>
            <td>The <a href="http://www.w3.org/PICS/"><strong><font color="#920011">PICS</font></strong></a> rating for the channel.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">textInput</span></td>
            <td>Specifies a text input box that can be displayed with the channel. More info <a href="http://jefftan.cn/blog/#lttextinputgtSubelementOfLtchannelgt"><strong><font color="#920011">here</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">skipHours</span></td>
            <td>A hint for aggregators telling them which hours they can skip. More info <a href="http://www.rssboard.org/skip-hours-days#skiphours"><strong><font color="#920011">here</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">skipDays</span></td>
            <td>A hint for aggregators telling them which days they can skip. More info <a href="http://www.rssboard.org/skip-hours-days#skipdays"><strong><font color="#920011">here</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<h5>&lt;image&gt; sub-element of &lt;channel&gt;<a name="ltimagegtSubelementOfLtchannelgt"></a> <a title="&lt;image&gt; sub-element of &lt;channel&gt;" href="http://jefftan.cn/blog/#ltimagegtSubelementOfLtchannelgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;image&gt; is an optional sub-element of &lt;channel&gt;, which contains three required and three optional sub-elements.</p>
<p>&lt;url&gt; is the URL of a GIF, JPEG or PNG image that represents the channel.</p>
<p>&lt;title&gt; describes the image, it's used in the ALT attribute of the HTML &lt;img&gt; tag when the channel is rendered in HTML.</p>
<p>&lt;link&gt; is the URL of the site, when the channel is rendered, the image is a link to the site. (Note, in practice the image &lt;title&gt; and &lt;link&gt; should have the same value as the channel's &lt;title&gt; and &lt;link&gt;.</p>
<p>Optional elements include &lt;width&gt; and &lt;height&gt;, numbers, indicating the width and height of the image in pixels. &lt;description&gt; contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering.</p>
<p>Maximum value for width is 144, default value is 88.</p>
<p>Maximum value for height is 400, default value is 31.</p>
<h5>&lt;cloud&gt; sub-element of &lt;channel&gt;<a name="ltcloudgtSubelementOfLtchannelgt"></a> <a title="&lt;cloud&gt; sub-element of &lt;channel&gt;" href="http://jefftan.cn/blog/#ltcloudgtSubelementOfLtchannelgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;cloud&gt; is an optional sub-element of &lt;channel&gt;.</p>
<p>It specifies a web service that supports the rssCloud interface which can be implemented in HTTP-POST, XML-RPC or SOAP 1.1.</p>
<p>Its purpose is to allow processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.</p>
<p class="example">&lt;cloud domain=&quot;rpc.sys.com&quot; port=&quot;80&quot; path=&quot;/RPC2&quot; registerProcedure=&quot;myCloud.rssPleaseNotify&quot; protocol=&quot;xml-rpc&quot; /&gt;</p>
<p>In this example, to request notification on the channel it appears in, you would send an XML-RPC message to rpc.sys.com on port 80, with a path of /RPC2. The procedure to call is myCloud.rssPleaseNotify.</p>
<p>A full explanation of this element and the rssCloud interface is <a href="http://www.rssboard.org/rsscloud-interface"><strong><font color="#920011">here</font></strong></a>.</p>
<h5>&lt;ttl&gt; sub-element of &lt;channel&gt;<a name="ltttlgtSubelementOfLtchannelgt"></a> <a title="&lt;ttl&gt; sub-element of &lt;channel&gt;" href="http://jefftan.cn/blog/#ltttlgtSubelementOfLtchannelgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;ttl&gt; is an optional sub-element of &lt;channel&gt;.</p>
<p>ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. This makes it possible for RSS sources to be managed by a file-sharing network such as <a href="http://www.gnutellanews.com/information/what_is_gnutella.shtml"><strong><font color="#920011">Gnutella</font></strong></a>.</p>
<p>Example:</p>
<p class="example">&lt;ttl&gt;60&lt;/ttl&gt;</p>
<h5>&lt;textInput&gt; sub-element of &lt;channel&gt;<a name="lttextinputgtSubelementOfLtchannelgt"></a> <a title="&lt;textInput&gt; sub-element of &lt;channel&gt;" href="http://jefftan.cn/blog/#lttextinputgtSubelementOfLtchannelgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>A channel may optionally contain a &lt;textInput&gt; sub-element, which contains four required sub-elements.</p>
<p>&lt;title&gt; -- The label of the Submit button in the text input area.</p>
<p>&lt;description&gt; -- Explains the text input area.</p>
<p>&lt;name&gt; -- The name of the text object in the text input area.</p>
<p>&lt;link&gt; -- The URL of the CGI script that processes text input requests.</p>
<p>The purpose of the &lt;textInput&gt; element is something of a mystery. You can use it to specify a search engine box. or to allow a reader to provide feedback. Most aggregators ignore it.</p>
<h4>Elements of &lt;item&gt;<a name="hrelementsOfLtitemgt"></a> <a title="Elements of &lt;item&gt;" href="http://jefftan.cn/blog/#hrelementsOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>A channel may contain any number of &lt;item&gt;s. An item may represent a &quot;story&quot; -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see <a href="http://www.rssboard.org/rss-encoding-examples"><strong><font color="#920011">examples</font></strong></a>), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.</p>
<table cellspacing="10">
    <tbody>
        <tr valign="top">
            <td>Element</td>
            <td>Description</td>
            <td width="50%">Example</td>
        </tr>
        <tr valign="top">
            <td><span class="element">title</span></td>
            <td>The title of the item.</td>
            <td class="examplecell">Venice Film Festival Tries to Quit Sinking</td>
        </tr>
        <tr valign="top">
            <td><span class="element">link</span></td>
            <td>The URL of the item.</td>
            <td class="examplecell">http://nytimes.com/2004/12/07FEST.html</td>
        </tr>
        <tr valign="top">
            <td><span class="element">description</span></td>
            <td>The item synopsis.</td>
            <td class="examplecell">&lt;description&gt;Some of the most heated chatter at the Venice Film Festival this week was about the way that the arrival of the stars at the Palazzo del Cinema was being staged.&lt;/description&gt;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">author</span></td>
            <td>Email address of the author of the item. <a href="http://jefftan.cn/blog/#ltauthorgtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">category</span></td>
            <td>Includes the item in one or more categories. <a href="http://jefftan.cn/blog/#ltcategorygtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">comments</span></td>
            <td>URL of a page for comments relating to the item. <a href="http://jefftan.cn/blog/#ltcommentsgtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">enclosure</span></td>
            <td>Describes a media object that is attached to the item. <a href="http://jefftan.cn/blog/#ltenclosuregtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">guid</span></td>
            <td>A string that uniquely identifies the item. <a href="http://jefftan.cn/blog/#ltguidgtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">pubDate</span></td>
            <td>Indicates when the item was published. <a href="http://jefftan.cn/blog/#ltpubdategtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="top">
            <td><span class="element">source</span></td>
            <td>The RSS channel that the item came from. <a href="http://jefftan.cn/blog/#ltsourcegtSubelementOfLtitemgt"><strong><font color="#920011">More</font></strong></a>.</td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<h5>&lt;source&gt; sub-element of &lt;item&gt;<a name="ltsourcegtSubelementOfLtitemgt"></a> <a title="&lt;source&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltsourcegtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;source&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>Its value is the name of the RSS channel that the item came from, derived from its &lt;title&gt;. It has one required attribute, url, which links to the XMLization of the source.</p>
<p class="example">&lt;source url=&quot;http://www.tomalak.org/links2.xml&quot;&gt;Tomalak's Realm&lt;/source&gt;</p>
<p>The purpose of this element is to propagate credit for links, to publicize the sources of news items. It can be used in the Post command of an aggregator. It should be generated automatically when forwarding an item from an aggregator to a weblog authoring tool.</p>
<h5>&lt;enclosure&gt; sub-element of &lt;item&gt;<a name="ltenclosuregtSubelementOfLtitemgt"></a> <a title="&lt;enclosure&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltenclosuregtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;enclosure&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>It has three required attributes. url says where the enclosure is located, length says how big it is in bytes, and type says what its type is, a standard MIME type.</p>
<p>The url must be an http url.</p>
<p class="example">&lt;enclosure url=&quot;http://www.scripting.com/mp3s/weatherReportSuite.mp3&quot; length=&quot;12216320&quot; type=&quot;audio/mpeg&quot; /&gt;</p>
<p>A use-case narrative for this element is <a href="http://www.thetwowayweb.com/payloadsforrss"><strong><font color="#920011">here</font></strong></a>.</p>
<h5>&lt;category&gt; sub-element of &lt;item&gt;<a name="ltcategorygtSubelementOfLtitemgt"></a> <a title="&lt;category&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltcategorygtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;category&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>It has one optional attribute, domain, a string that identifies a categorization taxonomy.</p>
<p>The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. Processors may establish conventions for the interpretation of categories. Two examples are provided below:</p>
<p class="example">&lt;category&gt;Grateful Dead&lt;/category&gt;</p>
<p class="example">&lt;category domain=&quot;http://www.fool.com/cusips&quot;&gt;MSFT&lt;/category&gt;</p>
<p>You may include as many category elements as you need to, for different domains, and to have an item cross-referenced in different parts of the same domain.</p>
<h5>&lt;pubDate&gt; sub-element of &lt;item&gt;<a name="ltpubdategtSubelementOfLtitemgt"></a> <a title="&lt;pubDate&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltpubdategtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;pubDate&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>Its value is a <a href="http://asg.web.cmu.edu/rfc/rfc822.html"><strong><font color="#920011">date</font></strong></a>, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date.</p>
<p class="example">&lt;pubDate&gt;Sun, 19 May 2002 15:21:36 GMT&lt;/pubDate&gt;</p>
<h5>&lt;guid&gt; sub-element of &lt;item&gt;<a name="ltguidgtSubelementOfLtitemgt"></a> <a title="&lt;guid&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltguidgtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;guid&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>guid stands for globally unique identifier. It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.</p>
<p class="example">&lt;guid&gt;http://some.server.com/weblogItem3207&lt;/guid&gt;</p>
<p>There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.</p>
<p>If the guid element has an attribute named isPermaLink with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the &lt;item&gt; element. An example:</p>
<p class="example">&lt;guid isPermaLink=&quot;true&quot;&gt;http://inessential.com/2002/09/01.php#a2&lt;/guid&gt;</p>
<p>isPermaLink is optional, its default value is true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular.</p>
<h5>&lt;comments&gt; sub-element of &lt;item&gt;<a name="ltcommentsgtSubelementOfLtitemgt"></a> <a title="&lt;comments&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltcommentsgtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;comments&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>If present, it is the url of the comments page for the item.</p>
<p class="example">&lt;comments&gt;http://ekzemplo.com/entry/4403/comments&lt;/comments&gt;</p>
<p>More about comments <a href="http://backend.userland.com/weblogComments"><strong><font color="#920011">here</font></strong></a>.</p>
<h5>&lt;author&gt; sub-element of &lt;item&gt;<a name="ltauthorgtSubelementOfLtitemgt"></a> <a title="&lt;author&gt; sub-element of &lt;item&gt;" href="http://jefftan.cn/blog/#ltauthorgtSubelementOfLtitemgt"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h5>
<p>&lt;author&gt; is an optional sub-element of &lt;item&gt;.</p>
<p>It's the email address of the author of the item. For newspapers and magazines syndicating via RSS, the author is the person who wrote the article that the &lt;item&gt; describes. For collaborative weblogs, the author of the item might be different from the managing editor or webmaster. For a weblog authored by a single individual it would make sense to omit the &lt;author&gt; element.</p>
<p class="example">&lt;author&gt;lawyer@boyer.net (Lawyer Boyer)&lt;/author&gt;</p>
<h4>Comments<a name="comments"></a> <a title="Comments" href="http://jefftan.cn/blog/#comments"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>RSS places restrictions on the first non-whitespace characters of the data in &lt;link&gt; and &lt;url&gt; elements. The data in these elements must begin with an <a href="http://www.iana.org/assignments/uri-schemes"><strong><font color="#920011">IANA-registered</font></strong></a> URI scheme, such as http://, https://, news://, mailto: and ftp://. Prior to RSS 2.0, the specification only allowed http:// and ftp://, however, in practice other URI schemes were in use by content developers and supported by aggregators. Aggregators may have limits on the URI schemes they support. Content developers should not assume that all aggregators support all schemes.</p>
<p>In RSS 0.91, various elements are restricted to 500 or 100 characters. There can be no more than 15 &lt;items&gt; in a 0.91 &lt;channel&gt;. There are no string-length or XML-level limits in RSS 0.92 and greater. Processors may impose their own limits, and generators may have preferences that say no more than a certain number of &lt;item&gt;s can appear in a channel, or that strings are limited in length.</p>
<p>In RSS 2.0, <a name="syndic8"></a>a provision is made for linking a channel to its identifier in a cataloging system, using the channel-level category feature, described above. For example, to link a channel to its Syndic8 identifier, include a category element as a sub-element of &lt;channel&gt;, with domain &quot;Syndic8&quot;, and value the identifier for your channel in the Syndic8 database. The appropriate category element for Scripting News would be &lt;category domain=&quot;Syndic8&quot;&gt;1765&lt;/category&gt;.</p>
<p>A frequently asked question about &lt;guid&gt;s is how do they compare to &lt;link&gt;s. Aren't they the same thing? Yes, in some content systems, and no in others. In some systems, &lt;link&gt; is a permalink to a weblog item. However, in other systems, each &lt;item&gt; is a synopsis of a longer article, &lt;link&gt; points to the article, and &lt;guid&gt; is the permalink to the weblog entry. In all cases, it's recommended that you provide the guid, and if possible make it a permalink. This enables aggregators to not repeat items, even if there have been editing changes.</p>
<p>If you have questions about the RSS 2.0 format, please post them on the <a href="http://groups.yahoo.com/group/rss-public"><strong><font color="#920011">RSS-Public</font></strong></a> mailing list. The list, maintained by the RSS Advisory Board, serves as a support resource for users, authors and developers who are creating and using content in the format.</p>
<h4>Extending RSS<a name="extendingRss"></a> <a title="Extending RSS" href="http://jefftan.cn/blog/#extendingRss"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>RSS originated in 1999, and has strived to be a simple, easy to understand format, with relatively modest goals. After it became a popular format, developers wanted to extend it using modules defined in namespaces, as <a href="http://www.w3.org/TR/REC-xml-names/"><strong><font color="#920011">specified</font></strong></a> by the W3C.</p>
<p>RSS 2.0 adds that capability, following a simple rule. A RSS feed may contain elements and attributes not described on this page, only if those elements and attributes are defined in a namespace.</p>
<p>The elements defined in this document are not themselves members of a namespace, so that RSS 2.0 can remain compatible with previous versions in the following sense -- a version 0.91 or 0.92 file is also a valid 2.0 file. If the elements of RSS 2.0 were in a namespace, this constraint would break, a version 0.9x file <i>would not</i> be a valid 2.0 file.</p>
<h4>Roadmap<a name="roadmap"></a> <a title="Roadmap" href="http://jefftan.cn/blog/#roadmap"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>RSS is by no means a perfect format, but it is very popular and widely supported. Having a settled spec is something RSS has needed for a long time. The purpose of this work is to help it become a unchanging thing, to foster growth in the market that is developing around it, and to clear the path for innovation in new syndication formats. Therefore, the RSS spec is, for all practical purposes, frozen at version 2.0.1. We anticipate possible 2.0.2 or 2.0.3 versions, etc. only for the purpose of clarifying the specification, not for adding new features to the format. Subsequent work should happen in modules, using namespaces, and in completely new syndication formats, with new names.</p>
<h4>License and authorship<a name="licenseAndAuthorship"></a> <a title="License and authorship" href="http://jefftan.cn/blog/#licenseAndAuthorship"><img height="9" alt="*" src="http://www.rssboard.org/images/left-arrow.gif" width="11" border="0" /></a></h4>
<p>This document is authored by the <a href="http://www.rssboard.org/"><strong><font color="#920011">RSS Advisory Board</font></strong></a> and is offered under the terms of the Creative Commons <a href="http://creativecommons.org/licenses/by-sa/2.0/"><strong><font color="#920011">Attribution/Share Alike</font></strong></a> license, based on an original document published by the Berkman Center for Internet &amp; Society at Harvard Law School authored by Dave Winer.</p>
</div>]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/69.htm</link>
			<title><![CDATA[Blogger无法访问的解决方法]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Sat,29 Mar 2008 00:49:09 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=69</guid>
		<description><![CDATA[最近申请了Blogger的博客，发现可以发文、修改、布局，但是就是无法预览自己的博客，这是怎么回事呢？<br/><br/>仔细观察，后台的一切操作都是在blogger.com域名下进行的，而博客本身却是在blogspot.com域名下。上网看了看，发现blogspot.com不止一次的被中国封掉，看来这就是博客无法显示的罪魁祸首。<br/><br/>在中国政府放松政策之前，访问Blogger的博客只能使用代理。这里给一个比较稳定的：72.14.219.190。如果你不想一次又一次的输入代理的话，可以直接修改X:\Windows\System32\drivers\etc\hosts文件，注意其中X指代系统盘符，另外，hosts文件是隐藏的，直接用记事本打开即可。修改的方式是在最下面加一行<div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">72.14.219.190 jeffinmaryland.blogspot.com</div></div>其中jeffinmaryland替换为你的Blogger网址。<br/><br/>搞定代理，突破封锁，尽情欣赏自己的Blogger吧！]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/61.htm</link>
			<title><![CDATA[让一些网站不经过教育网直通车直接连接]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Sat,15 Mar 2008 12:57:39 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=61</guid>
		<description><![CDATA[今天看赛车，希望同时收看教育网内的网上<a href="http://jefftan.cn/tv" target="_blank">直播</a>和官方网站的LiveTiming，遇到了一些麻烦。因为官网需要连接教育网直通车才能登上，而<a href="http://jefftan.cn/tv" target="_blank">直播</a>的流媒体在登录了教育网直通车后就没有办法流畅播出了。<br/><br/>到底教育网直通车能否实现在某些网站上使用而一些其它网站上禁用的要求呢？答案是：可以的。<br/><br/>具体方法：<br/>1. 打开文件夹%USERPROFILE%\Application Data\Microsoft\Network\Connections\Cm\edu_vip <br/>或者%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Connections\Cm\edu_vip。其中%USERPROFILE%指的是用户根文件夹，如C:\Documents and Settings\Administrator等。<br/><br/>2. 找到文件addcer.txt，在下面添加一行<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">ADD 210.51.4.51 MASK 255.255.255.255 default METRIC default IF default</div></div><br/>其中210.51.4.51是你想要不使用教育网直通车访问的网站的IP地址。如果你只知道网页的位置，网上提供了很多查询网页所属IP的页面，查到后加入即可。<br/><br/>3. 找到文件delcer.txt，在下面加一行<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">Del&#101;te 210.51.4.51 MASK 255.255.255.255 default METRIC default IF default</div></div><br/><br/>4. 重启教育网直通车<br/><br/>这样就可以啦。]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/55.htm</link>
			<title><![CDATA[pjblog无法登录原因分析]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Tue,04 Mar 2008 11:19:57 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=55</guid>
		<description><![CDATA[最近登录博客时会不时出现很奇怪的情况，就是登陆pjblog成功以后返回仍然显示未登录状态。感觉很奇怪。本来以为是Cookie的问题，于是在Internet选项中将安全级别调到了最低，仍然不见起色。<br/><br/>今天，我在查询访问记录时，终于发现了问题的关键所在。<br/><br/><img src="http://jefftan.cn/blog/attachments/month_0803/q200834111518.gif" border="0" alt=""/><br/><br/>上图是访问记录的截图，红线部分是数次登录未成功的记录。可以发现ip地址在不断的变化。这种不稳定的ip地址会造成Cookie记录上的麻烦。这让系统认为现在已经是另一台电脑在访问页面了，自然没有对应的登录信息。<br/><br/>解决的方法当然是寻找一个固定的IP。我的IP问题主要在于开启了教育网直通车，于是就关掉教育网直通车。再次登录，一切正常。<br/><br/>当然，造成无法登录的情况并不只有这一个。具体的问题需要具体分析。希望我的经历能给pjbloger们带来一些帮助。]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/29.htm</link>
			<title><![CDATA[为你的网站加上RSS阅读功能]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Sat,02 Feb 2008 17:41:35 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=29</guid>
		<description><![CDATA[RSS(也叫聚合内容，Really Simple Syndication)是一种描述和同步网站内容的格式，是目前使用最广泛的XML应用。<br/>关于RSS，可以参考<a target="_blank" href="http://baike.baidu.com/view/1644.htm" rel="external">http://baike.baidu.com/view/1644.htm</a>。<br/><br/>下面主要介绍一下如何编写标准的RSS代码。我们以<a href="http://jefftan.cn" target="_blank">小Tan工作室</a>的飞驰F1专区的新闻中心为例，实例参看<a target="_blank" href="http://jefftan.cn/F1/feed.asp" rel="external">http://jefftan.cn/F1/feed.asp</a>。<br/><br/>首先来看看RSS的标准标签，在头(head)的部分，最简易的代码如下：<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>&lt;!--#include file=&#34;include/conn.asp&#34;--&gt;<br/>&lt;%<br/>response.charset=&#34;utf-8&#34; <br/>Response.ContentType=&#34;text/xml&#34;<br/>%&gt;<br/>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;<br/>&lt;rss version=&#39;2.0&#39;&gt;<br/>&lt;channel&gt;<br/>&lt;title&gt;&lt;![CDATA[飞驰F1 2008赛季新闻中心]]&gt;&lt;/title&gt;<br/>&lt;link&gt;<a href="http://jefftan.cn/f1/" target="_blank" rel="external">http://jefftan.cn/f1/</a>&lt;/link&gt;<br/>&lt;description&gt;&lt;![CDATA[<a href="http://jefftan.cn" target="_blank">小Tan工作室</a>飞驰F1专区新闻中心]]&gt;&lt;/description&gt;<br/>&lt;language&gt;zh-cn&lt;/language&gt;<br/>&lt;copyright&gt;&lt;![CDATA[Copyright 1999-2008 Jeff&#39;s Studio]]&gt;&lt;/copyright&gt;<br/>&lt;generator&gt;Rss Generator By Jefftan.cn&lt;/generator&gt;<br/></div></div><br/>其中首行链接动态数据库。编码采取的是UTF-8形式，也可以改为GB2312等形式。<br/>&lt;title&gt; RSS源的主题<br/>&lt;link&gt; RSS源的链接<br/>&lt;description&gt; RSS源的介绍<br/>&lt;language&gt; 显示的语言，英语为en，中文为zh-cn<br/>&lt;copyright&gt; 版权信息，可省<br/>&lt;generator&gt; RSS文件生成信息，可省<br/>还有其他的标签可以添加，有不同的功用，比较有意思的是&lt;image&gt;标签，这里都不专门提出了。<br/><br/>下面就是body部分的代码<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>&lt;%<br/>set rs=server.cr&#101;ateobject(&#34;adodb.recordset&#34;) <br/>sql=&#34;sel&#101;ct top 10 * from f1news o&#114;der by id desc&#34;<br/>rs.open sql,db,1,1<br/>%&gt;<br/>&nbsp;&nbsp;&lt;%do while not rs.eof%&gt;<br/>&lt;item&gt;<br/>&lt;link&gt;<a href="http://jefftan.cn/f1/" target="_blank" rel="external">http://jefftan.cn/f1/</a>readnews.asp?id=1&lt;/link&gt;<br/>&lt;title&gt;&lt;![CDATA[&lt;%=rs(&#34;title&#34;)%&gt;]]&gt;&lt;/title&gt;<br/>&lt;author&gt;&lt;%=rs(&#34;author&#34;)%&gt;&lt;/author&gt;<br/>&lt;pubDate&gt;&lt;%=rs(&#34;date&#34;)%&gt;&lt;/pubDate&gt;<br/>&lt;description&gt;&lt;![CDATA[&lt;%=rs(&#34;content&#34;)%&gt;]]&gt;&lt;/description&gt;<br/>&lt;/item&gt;<br/>&nbsp;&nbsp;&lt;%<br/>&nbsp;&nbsp; rs.movenext<br/>&nbsp;&nbsp; loop<br/>&nbsp;&nbsp;%&gt;<br/>&lt;%<br/>rs.close<br/>set rs=nothing<br/>%&gt;<br/><br/>&lt;/channel&gt;<br/>&lt;/rss&gt;<br/></div></div><br/>这一部分是由多个&lt;item&gt;标签组合而成，每个标签即一个条目，下面有很多子标签，这里仅仅列出最基常用的几个标签。<br/>&lt;title&gt; 文章题目<br/>&lt;link&gt; 文章地址<br/>&lt;author&gt; 文章作者<br/>&lt;pubdate&gt; 文章发布时间<br/>&lt;description&gt; 文章摘要<br/>当然，还可以尝试更多其它的标签，这里同样略去了。<br/><br/>对于asp动态网页，直接使用do while ... loop语句就可以实现动态抓取。注意在xml网页格式中，asp代码的调用与html网页格式中的调用时完全一样的。<br/><br/>将两部分合起来，就搞定啦，保存为feed.asp，直接访问就可以啦。]]></description>
		</item>
		
			<item>
			<link>http://jefftan.cn/blog/article/web/27.htm</link>
			<title><![CDATA[将你的网站使用UTF-8重新编码]]></title>
			<author>jefftan@163.com(jefftan)</author>
			<category><![CDATA[网站]]></category>
			<pubDate>Mon,28 Jan 2008 21:13:33 +0800</pubDate>
			<guid>http://jefftan.cn/blog/default.asp?id=27</guid>
		<description><![CDATA[UTF-8编码是目前比较公认的一种编码方式，大多数的大型网站都已经开始使用UTF-8进行编码。当然，很多较老的，特别是在Windows上编写的网站采用的还是GB-2312编码方式。在Windows系统下这样的编码是完全没有问题的，但是在Linux系统下的很多浏览器无法识别这种编码方式，所有的中文都变成了乱码。在Linux逐渐流行的时代，将网页重新编码为UTF-8势在必行。<br/><br/>下面简要的说一下修改的步骤。<br/><br/>1. 将所有网页文件的编码方式从ANSI转换为UTF-8格式。直接在记事本中另存为就可以办到了。当然，网上提供了一些批量转换的工具和脚本，可以快速的进行转换。<br/><br/>2. 在网页头上声明网页类型为UTF-8格式。即在&lt;head&gt;标签内加入<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">&lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=UTF-8&#34; /&gt;<br/>&lt;meta http-equiv=&#34;Content-Language&#34; content=&#34;UTF-8&#34; /&gt;</div></div><br/><br/>3. 完成后从数据库中读入的数据仍有可能是乱码，需要在conn.asp（即读取数据库信息的文件）中加入下面的一句就可以了。<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://jefftan.cn/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent">&lt;%@CodePage=&#34;65001&#34;%&gt; <br/>&lt;%session.codepage=&#34;65001&#34; %&gt;<br/>&lt;%response.charset=&#34;utf-8&#34; %&gt; </div></div><br/>&#160;&#160;&#160;&#160;<br/><a href="http://jefftan.cn" target="_blank">小Tan工作室</a>于1月28日全面更新为UTF-8编码方式。欢迎<a target="_blank" href="http://jefftan.cn/index.asp" rel="external">访问</a>。]]></description>
		</item>
		
</channel>
</rss>
