用ASP.NET做一个自己的新闻发布RSS

简介: 目前的网站项目里面有一块资讯的栏目,这一次项目组决定用RSS的方式发布,与国际接轨哈。呵呵~       那么我们的新闻资讯需要生成一些频道的RSS文件,还是祭起我们的老伙计:ASP.NET,让它去动态生成这个中规中矩的XML文件吧!       首先我们可得完成RSS的生成类,Channel(频道) 和 Item(条目),在这里只是按RSS的规则添加了一些必要的节点项目。

       目前的网站项目里面有一块资讯的栏目,这一次项目组决定用RSS的方式发布,与国际接轨哈。呵呵~
       那么我们的新闻资讯需要生成一些频道的RSS文件,还是祭起我们的老伙计:ASP.NET,让它去动态生成这个中规中矩的XML文件吧!

       首先我们可得完成RSS的生成类,Channel(频道) 和 Item(条目),在这里只是按RSS的规则添加了一些必要的节点项目。

类图


ITEM类:很简单,定义了一个条目信息常用的一些元素

img_a6339ee3e57d1d52bc7d02b338e15a60.gif using  System;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.Services;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.Services.Protocols;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
public   class  Item
img_405b18b4b6584ae338e0f6ecaf736533.gifimg_1c53668bcee393edac0d7b3b3daff1ae.gif
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif {
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
字段#region 字段
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 标题
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string title;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 链接
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string link;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 描述
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string description;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 发布日期
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string pubdate;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 来源
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string source;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 作者
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string author;
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion
 
img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
属性#region 属性
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 标题
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Title
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.title;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.title = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 链接
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Link
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.link;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.link = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 描述
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Description
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.description;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.description = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 发布日期
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Pubdate
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.pubdate;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.pubdate = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 来源
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Source
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.source;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.source = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 来源
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Author
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.author;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.author = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
构造函数#region 构造函数
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 资讯条目
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public Item()
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 资讯条目
img_33d02437d135341f0800e3d415312ae8.gif    
/// </summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// <param name="Title">标题</param>
img_33d02437d135341f0800e3d415312ae8.gif    
/// <param name="Link">链接</param>
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// <param name="Description">描述</param>

img_33d02437d135341f0800e3d415312ae8.gif    public Item(string Title, string Link, string Description)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
this.title = Title;
img_33d02437d135341f0800e3d415312ae8.gif        
this.link = Link;
img_33d02437d135341f0800e3d415312ae8.gif        
this.description = Description;
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_05dd8d549cff04457a6366b0a7c9352a.gif}

img_a6339ee3e57d1d52bc7d02b338e15a60.gif

CHANNEL类:常用的频道信息,以及一个条目组,对条目组的添加方法,以及把CHANNEL导出XML的一些方法。组成XML文件时,没有传统意义上的XmlDocument的操作方式,感觉麻烦,不若直接按格式凑文本来的快。^_*

img_a6339ee3e57d1d52bc7d02b338e15a60.gif using  System;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.Services;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.Services.Protocols;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Data;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.IO;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Text;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Xml;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
public   class  Channel
img_405b18b4b6584ae338e0f6ecaf736533.gifimg_1c53668bcee393edac0d7b3b3daff1ae.gif
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif {
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
字段#region 字段
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 标题
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string title;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 链接
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string link;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 描述
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private string description;
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 条目组
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    private Item[] items;
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
属性#region 属性
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 描述
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Description
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.description;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.description = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 条目组
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public Item[] Items
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.items;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 标题
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Title
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.title;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.title = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 链接
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string Link
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
get
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
return this.link;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
set
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.link = value;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
构造函数#region 构造函数
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 资讯频道
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public Channel()
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
方法#region 方法
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 添加条目到频道
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public void AddItem( Item item )
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
if (this.items == null)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            
this.items = new Item[1];
img_33d02437d135341f0800e3d415312ae8.gif            
this.items[0= item;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
else
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            Item[] itemTemp 
= new Item[this.items.Length];
img_33d02437d135341f0800e3d415312ae8.gif            itemTemp 
= this.items;
img_33d02437d135341f0800e3d415312ae8.gif            
this.items = new Item[this.items.Length + 1];
img_33d02437d135341f0800e3d415312ae8.gif            
for ( int i = 0; i < itemTemp.Length; i ++  )
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif            
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif                
this.items[i] = itemTemp[i];
img_105a1e124122b2abcee4ea8e9f5108f3.gif            }

img_33d02437d135341f0800e3d415312ae8.gif            
this.items[this.items.Length-1= item;
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }
        
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 获取频道的RSS文件的内容
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public string GetRSS()
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{      
img_33d02437d135341f0800e3d415312ae8.gif        StringBuilder strRtn 
= new StringBuilder();
img_33d02437d135341f0800e3d415312ae8.gif        
string strLine = string.Empty;
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        strLine 
= "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(strLine);
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(
"<rss version=\"2.0\">");
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(
"<channel>");
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(
"<title>" + this.title + "</title>");
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(
"<link>" + this.link + "</link>");
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
if (!string.IsNullOrEmpty(this.description))
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            strLine 
= "<description>" + this.description + "</description>";
img_33d02437d135341f0800e3d415312ae8.gif            strRtn.Append(strLine);
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
foreach (Item newsItem in this.items)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            strRtn.Append(
"<item>");
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            strRtn.Append(
"<title><![CDATA[" + newsItem.Title + " ]]></title>");
img_33d02437d135341f0800e3d415312ae8.gif            strRtn.Append(
"<link><![CDATA[" + newsItem.Link + " ]]></link>");
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            
if (!string.IsNullOrEmpty(newsItem.Description))
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif            
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif                strLine 
= "<description><![CDATA[" + newsItem.Description + " ]]></description>";
img_33d02437d135341f0800e3d415312ae8.gif                strRtn.Append(strLine);
img_105a1e124122b2abcee4ea8e9f5108f3.gif            }

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            
if (!string.IsNullOrEmpty(newsItem.Pubdate))
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif            
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif                strLine 
= "<pubDate><![CDATA[" + newsItem.Pubdate + " ]]></pubDate>";
img_33d02437d135341f0800e3d415312ae8.gif                strRtn.Append(strLine);
img_105a1e124122b2abcee4ea8e9f5108f3.gif            }

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            
if (!string.IsNullOrEmpty(newsItem.Source))
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif            
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif                strLine 
= "<source><![CDATA[" + newsItem.Source + " ]]></source>";
img_33d02437d135341f0800e3d415312ae8.gif                strRtn.Append(strLine);
img_105a1e124122b2abcee4ea8e9f5108f3.gif            }

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            
if (!string.IsNullOrEmpty(newsItem.Author))
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif            
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif                strLine 
= "<author><![CDATA[" + newsItem.Author + " ]]></author>";
img_33d02437d135341f0800e3d415312ae8.gif                strRtn.Append(strLine);
img_105a1e124122b2abcee4ea8e9f5108f3.gif            }

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            strRtn.Append(
"</item>");
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(
"</channel>");
img_33d02437d135341f0800e3d415312ae8.gif        strRtn.Append(
"</rss>");
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
return strRtn.ToString();
img_33d02437d135341f0800e3d415312ae8.gif        
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 获取频道的RSS文件
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public void GetRSSFile(string fileName)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        StreamWriter sw 
= new StreamWriter(fileName,false);
img_33d02437d135341f0800e3d415312ae8.gif        sw.WriteLine(
this.GetRSS());
img_33d02437d135341f0800e3d415312ae8.gif        sw.Close();
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
/**//// <summary>
img_33d02437d135341f0800e3d415312ae8.gif    
/// 获取频道的RSS XMLDocument
img_105a1e124122b2abcee4ea8e9f5108f3.gif    
/// </summary>

img_33d02437d135341f0800e3d415312ae8.gif    public XmlDocument GetRSSDocument()
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        XmlDocument xmlRtn 
= new XmlDocument();
img_33d02437d135341f0800e3d415312ae8.gif        xmlRtn.LoadXml(
this.GetRSS());
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
return xmlRtn;
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_05dd8d549cff04457a6366b0a7c9352a.gif}

img_a6339ee3e57d1d52bc7d02b338e15a60.gif


类做好了,接下来完成RSS页的代码构建。前台不用管它,需要做的是它的cs程序:

RSS.aspx .cs: 从数据库获取频道和条目信息,组成RSS文件。
访问时,可加上连接字符串,改变频道,例如:
http://localhost/xmlDataSet/Rss.aspx?channel=00001
http://localhost/xmlDataSet/Rss.aspx?channel=00002

img_a6339ee3e57d1d52bc7d02b338e15a60.gif using  System;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Data;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Configuration;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Collections;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.Security;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.UI;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.UI.WebControls;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.UI.WebControls.WebParts;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Web.UI.HtmlControls;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Xml;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
using  System.Data.OleDb;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
public  partial  class  Rss : System.Web.UI.Page
img_405b18b4b6584ae338e0f6ecaf736533.gifimg_1c53668bcee393edac0d7b3b3daff1ae.gif
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif {
img_33d02437d135341f0800e3d415312ae8.gif    
protected void Page_Load(object sender, EventArgs e)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
//made by hekui 2007-01-27
img_33d02437d135341f0800e3d415312ae8.gif

img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif        
根据查询字符串,判断查看的频道#region 根据查询字符串,判断查看的频道
img_33d02437d135341f0800e3d415312ae8.gif        
string strChannel_ID;
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif        
if (string.IsNullOrEmpty(Request["channel"]))
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            strChannel_ID 
= "00001";
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_33d02437d135341f0800e3d415312ae8.gif        
else
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            strChannel_ID 
= Request["channel"];
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif        
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif        
构造频道信息#region 构造频道信息
img_33d02437d135341f0800e3d415312ae8.gif        DataTable dtChannel 
= getTable("select TITLE,LINK,DESCRIPTION from CHANNEL where CHANNEL_ID = '" + strChannel_ID + "'");
img_33d02437d135341f0800e3d415312ae8.gif        Channel channel 
= new Channel();
img_33d02437d135341f0800e3d415312ae8.gif        channel.Title 
= dtChannel.Rows[0]["TITLE"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif        channel.Link 
= dtChannel.Rows[0]["LINK"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif        channel.Description 
= dtChannel.Rows[0]["DESCRIPTION"].ToString();
img_105a1e124122b2abcee4ea8e9f5108f3.gif        
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif        
构造条目信息#region 构造条目信息
img_33d02437d135341f0800e3d415312ae8.gif        DataTable dtItem 
= getTable("select TITLE,LINK,DESCRIPTION,PUBDATE,SOURCE,AUTHOR from ITEM where CHANNEL_ID = '" + strChannel_ID + "'");
img_33d02437d135341f0800e3d415312ae8.gif        
foreach (DataRow dr in dtItem.Rows)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif        
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif            Item item 
= new Item();
img_33d02437d135341f0800e3d415312ae8.gif            item.Title 
= dr["TITLE"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif            item.Link 
= dr["LINK"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif            item.Description 
= dr["DESCRIPTION"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif            item.Pubdate 
= dr["PUBDATE"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif            item.Source 
= dr["SOURCE"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif            item.Author 
= dr["AUTHOR"].ToString();
img_33d02437d135341f0800e3d415312ae8.gif
img_33d02437d135341f0800e3d415312ae8.gif            channel.AddItem(item);
img_105a1e124122b2abcee4ea8e9f5108f3.gif        }

img_105a1e124122b2abcee4ea8e9f5108f3.gif        
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif        
RSS内容导出#region RSS内容导出
img_33d02437d135341f0800e3d415312ae8.gif        Response.Clear();
img_33d02437d135341f0800e3d415312ae8.gif        Response.ClearContent();
img_33d02437d135341f0800e3d415312ae8.gif        Response.ClearHeaders();
img_33d02437d135341f0800e3d415312ae8.gif        Response.ContentType 
= "text/xml;charset='utf-8'";
img_33d02437d135341f0800e3d415312ae8.gif        Response.Write(channel.GetRSS());
img_33d02437d135341f0800e3d415312ae8.gif        Response.End();
img_105a1e124122b2abcee4ea8e9f5108f3.gif        
#endregion

img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
获取数据库链接#region 获取数据库链接
img_33d02437d135341f0800e3d415312ae8.gif    
private OleDbConnection getConn()
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("news.mdb"+ ";Persist Security Info=False";
img_33d02437d135341f0800e3d415312ae8.gif        OleDbConnection conn 
= new OleDbConnection(strConn);
img_33d02437d135341f0800e3d415312ae8.gif        
return conn;
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_33d02437d135341f0800e3d415312ae8.gif
img_7a2b9a960ee9a98bfd25d306d55009f8.gifimg_2887d91d0594ef8793c1db92b8a1d545.gif    
根据SQL获取DataTable#region 根据SQL获取DataTable
img_33d02437d135341f0800e3d415312ae8.gif    
private DataTable getTable(string sqlString)
img_2887d91d0594ef8793c1db92b8a1d545.gifimg_7a2b9a960ee9a98bfd25d306d55009f8.gif    
img_a76e9bb6ed00cf1c9c9f4ee2f04b558b.gif{
img_33d02437d135341f0800e3d415312ae8.gif        OleDbDataAdapter da 
= new OleDbDataAdapter(sqlString, getConn());
img_33d02437d135341f0800e3d415312ae8.gif        DataSet ds 
= new DataSet();
img_33d02437d135341f0800e3d415312ae8.gif        da.Fill(ds);
img_33d02437d135341f0800e3d415312ae8.gif        
return ds.Tables[0];
img_105a1e124122b2abcee4ea8e9f5108f3.gif    }

img_105a1e124122b2abcee4ea8e9f5108f3.gif    
#endregion

img_05dd8d549cff04457a6366b0a7c9352a.gif}

img_a6339ee3e57d1d52bc7d02b338e15a60.gif

示例程序:/Files/heekui/xmlDataSet.rar
示例程序里还有一个页面:一个简易的RSS阅读器,代码处理没按套路出牌,直接DataSet装载RSS源的。数据库玩惯了,Table的操作习惯些。

目录
相关文章
|
XML 定位技术 C#
ASP.NET的SEO:Linq to XML---网站地图和RSS Feed
本系列目录网站地图的作用是让搜索引擎尽快的,更多的收录网站的各个网页。    这里我们首先要明白一个基本的原理,搜索引擎的爬行方式。整个互联网就像一张纵横交错的“网”:网的各个节点就是各个网页,而各个网页之间通过url相互连接。
1047 0
用vb.net写一个简易的RSS阅读器
先发一个做出来的效果图哈哈!怎么样?对了DUDU,我这个还解决了看天下那个阅读器不能正常显示相对路径的图片的问题哟!现在不管相对的还是绝对的路径的图片都能正常显示哈!下面是源代码,没有太多注释,因为都比较简单嘛! Imports System.
898 0
vb.net写一个简易的RSS阅读器
十分简易哈!解决了相对图片路径不能正常显示!可用于博客园全文点击http://www.cnblogs.com/aowind/archive/2005/03/16/119838.html
635 0
RSS简易阅读器vb.net源代码
上次发了一个自己写的RSS阅读器的源代码http://www.cnblogs.com/aowind/archive/2005/03/16/119838.html这次打包发上来了上面还有用到的那个WEB浏览控件的COM组件http://files.
716 0
|
XML 数据格式
续用VB.net做RSS阅读器
继续上次做的RSS阅读器。http://www.cnblogs.com/aowind/archive/2005/03/16/119841.html这次做成了博客园的专用阅读器了,给左边加上了一个treeview,专门用来显示博客园的分类和博客列表。
757 0
用vb.net做一个RSS阅读器续--分类功能(博客园专用)
上次发布了一个简易的RSS阅读器的源代码这次给它加上了分类功能http://www.cnblogs.com/aowind/archive/2005/03/18/120942.html几有三个过程哈!对了,还有上次一位朋友把代码改写成了C#.
754 0
|
3月前
|
开发框架 前端开发 JavaScript
ASP.NET MVC 教程
ASP.NET 是一个使用 HTML、CSS、JavaScript 和服务器脚本创建网页和网站的开发框架。
48 7