I created an RSS feed with Java Rome lib. The project is near the end. But I found strange behavior in some RSS clients.
I think it's more of an RSS clients' problem, but I want to make sure.
Rome holds items in a List, so the latest items are at the end of the list. I opened my feed in my RSS clients (Firefox and RSS Bandit) and I found they are in reversed order (technically it's chronological, but reversed compared to the order I used).
I thought it's an RSS client bug (I usually use Google Reader), but I checked some feeds on the Internet and saw that reason that they display correctly is they have reverse ordered items (oldest on the top).
But XML parsers shouldn't rely on item order. Why do RSS clients use item order instead of dates for sorting items?
And, most importantly, should I reorder my items list?
Edit: I found an easy solution:
entries.add(0,entry); // :-)
But the question about "correct" client behavior remains.
firstChild
. – Shaman