The jQuery Autocomplete plugin is used to load feeds into the text box. Just start typing, and items that match your keystrokes will be highlighted as you type.
$(document).ready(function() { $("#rssURL").autocomplete("RssURLs.ashx"); $("#reutersTopItems").autocomplete("RssReutersTopStories.ashx"); $("#deliciousItems").autocomplete( "FeedServerTitles.ashx?url=http://feeds.delicious.com/v2/rss/djuth/flyfishing?count=100&pathTitle=/rss/channel/item/title"); $("#deliciousTags").autocomplete( "FeedServerTitles.ashx?url=http://feeds.delicious.com/v2/rss/tags/djuth?count=100&pathTitle=/rss/channel/item/title"); });
<%@ WebHandler Language="C#" Class="RssURLs" %> using System; using System.Web; public class RssURLs : IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("http://feeds.reuters.com/reuters/topNews/" + Environment.NewLine); context.Response.Write("http://feeds.encosia.com/Encosia/" + Environment.NewLine); context.Response.Write("http://www.west-wind.com/weblog/RSS.aspx" + Environment.NewLine); context.Response.Write("http://feeds2.feedburner.com/FlyFishingNews-Midcurrent/" + Environment.NewLine); context.Response.Write("http://www.engadget.com/rss.xml" + Environment.NewLine); context.Response.Write("http://feeds.feedburner.com/thecleanestline/" + Environment.NewLine); } public bool IsReusable { get { return false; } } }
<%@ WebHandler Language="C#" Class="RSSReutersTopStories" %> using System; using System.Web; public class RSSReutersTopStories : IHttpHandler { public void ProcessRequest (HttpContext context) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load("http://feeds.reuters.com/reuters/topNews/"); XmlNodeList nodes = xmlDoc.SelectNodes("/rss/channel/item/title"); foreach (XmlNode item in nodes) { context.Response.Write(item.InnerText + Environment.NewLine); } context.Response.ContentType = "text/plain"; } public bool IsReusable { get { return false; } } }
<%@ WebHandler Language="C#" Class="RSSReutersTopStories" %> using System; using System.Web; public class FeedServerTitles : IHttpHandler { public void ProcessRequest (HttpContext context) { string url = context.Request.QueryString["url"]; string pathTitle = context.Request.QueryString["pathTitle"]; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(url); XmlNodeList nodes = xmlDoc.SelectNodes(pathTitle); foreach (XmlNode item in nodes) { context.Response.Write(item.InnerText + Environment.NewLine); } context.Response.ContentType = "text/plain"; } public bool IsReusable { get { return false; } } }