Policy for polling RSS feeds?

Make use of HTTP cache. Send Etag and LastModified headers. Recognize 304 Not modified response. This way you can save a lot of bandwidth. Additionally some scripts recognize the LastModified header and return only partial contents (ie. only the two or three newest items instead of all 30 or so). Don’t poll RSS from services … Read more

Parse RSS pubDate to Date object in java

You can define the date format you are trying to parse, using the class SimpleDateFormat: DateFormat formatter = new SimpleDateFormat(“EEE, dd MMM yyyy HH:mm:ss zzz”); Date date = formatter.parse(“Sat, 24 Apr 2010 14:01:00 GMT”); Additionally, for non-English Locale‘s, be sure to use the following when parsing dates in English: new SimpleDateFormat(“EEE, dd MMM yyyy HH:mm:ss … Read more

How does RSS reader know that a feed is updated?

RSS is a file format source and doesn’t actually know anything about where it gets the entries from. The answer really is: “how can an http request get only the newest results from a server” and the answer is Conditional GET source. Http also supports Conditional PUT. This is an article about using this feature … Read more

Reading non-standard elements in a SyndicationItem with SyndicationFeed

This should give you an idea on how to do it: using System.Linq; using System.ServiceModel.Syndication; using System.Xml; using System.Xml.Linq; SyndicationFeed feed = reader.Read(); foreach (var item in feed.Items) { foreach (SyndicationElementExtension extension in item.ElementExtensions) { XElement ele = extension.GetObject<XElement>(); Console.WriteLine(ele.Value); } }

Why Are People Still Creating RSS Feeds?

The fundamental thing that the Atom creators didn’t understand (and that the Atom supporters still don’t understand), is that Atom isn’t somehow separate from RSS. There’s this idea that RSS fractured, and that somehow Atom fixes that problem. But it doesn’t. Atom is just another RSS splinter. A new name doesn’t change the fact that … Read more

How do I parse and convert DateTime’s to the RFC 822 date-time format?

Try this: DateTime today = DateTime.Now; String rfc822 = today.ToString(“r”); Console.WriteLine(“RFC-822 date: {0}”, rfc822); DateTime parsedRFC822 = DateTime.Parse(rfc822); Console.WriteLine(“Date: {0}”, parsedRFC822); The “r” format specifier passed into DateTime’s ToString() method actually yields an RFC-1123-formatted datetime string, but passes as an RFC-822 date as well, based on reading the specification found at http://www.w3.org/Protocols/rfc822/#z28. I’ve used this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)