如何将XML RSS FEEDS插入数据库 [英] How to insert XML RSS FEEDS into a database

查看:85
本文介绍了如何将XML RSS FEEDS插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello House,它也许我使用了错误的appraoch

所有这一切,我想看看我是否能够

要插入Feed描述,标题,链接,并发布日期

进入数据库,通过这样做,我将能够按我的意愿操纵。代码仍然相同:



Hello House, it Maybe I was using a wrong appraoch
All this while, I want to see if I will able
To insert feed description, title, link, and publish date
Into a database, by so doing, I will be able to manipulate as I want. The code is still the same:

<asp:Repeater ID="Repeater1" runat="server"
             DataSourceID="XmlDataSource1" onitemdatabound="Repeater1_ItemDataBound" >
            <itemtemplate>
                 <asp:HyperLink runat="server" ID="TitleLabel1" NavigateUrl='<%#string.Format("Default.aspx?News={0}", HttpUtility.UrlEncode(XPath("title").ToString()))%>' Text='<%#XPath("title")%>'><br />
                 <%#DateTime.Parse(XPath("pubDate").ToString()).ToString("MMMM dd, yyyy")%>
                 <asp:Label ID ="Desc" runat="server" Text='<%#XPath("description")%>' style="display:none;"><br />
                 <hr style="color:#0099ff;" /><br />
            </itemtemplate>



我正在使用Xml数据源,任何关于如何使用的想法
将此插入数据库将是赞赏。在此先感谢


I am using Xml datasource, any idea on how to
Insert this to a database will be appreciated. Thanks in advance

推荐答案

这是一个非常好的代码集来帮助您。这将返回给定Feed的URL的RSS数据项列表:



http://heathesh.com/post/2010/05/10/A-simple-way-to- read-an-RSS-feed-using-C.aspx [ ^ ]
Here is a really good code set to help you. This will return a list of RSS data items given the URL of the feed:

http://heathesh.com/post/2010/05/10/A-simple-way-to-read-an-RSS-feed-using-C.aspx[^]


这篇关于如何将XML RSS FEEDS插入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆