ROME in a Day: Parse and Publish Feeds in Java

O'Reilly XML.com
February 22, 2006

Ready to parse and publish RSS and Atom feeds in Java? In this step-by-step tutorial, we'll show you how to pull in an existing feed, add your own content, and publish the results in a new format, all in 100 lines of code. (200 lines with whitespace and comments.)
Knowing that RSS and Atom feeds are "just" XML, you might think that parsing and creating syndicated feeds in Java should be a snap. Pick any one type of RSS, and you might be right. Unfortunately, there are at least ten flavors of RSS and Atom out there: RSS 0.90, RSS 0.91 Netscape, RSS 0.91 Userland, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, and the newest addition to the bunch, Atom 1.0. Then there are all the namespace modules, like Dublin Core, Media, and so on. It's all messy enough to make a grown programmer cry. Wipe those tears, Java developers, and say hello to ROME.


When in ROME

In this tutorial, we'll be using ROME to do all the heavy lifting. ROME is an open source (Apache licensed) Java library which is designed to make it easy for you to parse and create syndicated feeds, regardless of format. In fact, all of the variants of RSS and Atom mentioned earlier are supported by ROME.ROME doesn't just come with features, it also has a proven track record on sites like My AOL, CNET Networks, and Edmunds.com. The Powered By ROME wiki page describes how ROME is being used in these and other applications.
The basic approach of ROME is to parse any RSS or Atom feed item into a canonical bean interface. This lets you as a developer manage fairly homogeneous item beans regardless of their original format. Even better, ROME makes it easy to create a new RSS or Atom feed, using those very same beans. This tutorial is going to show you how to do just that.
(To read the rest of this article, please click on the link in this blog post's title above.)


Create RSS 2.0 and Atom 1.0 in Asp.Net 3.5 C#

March 14, 2010
Deepu MI's Blog

In this article I am going to explain how we can create web syndications like RSS 2.0 and Atom 1.0 in Asp.Net and C# with very minimal code.

RSS 2.0
Really Simple Syndication (RSS) is one of the syndication feed formats which can get the frequently updated content from the web site. (Refer: http://en.wikipedia.org/wiki/RSS).
The specification of RSS format http://cyber.law.harvard.edu/rss/rss.html. RSS is most widely used syndication format.

Atom 1.0
Atom is a syndication format which is more flexible than RSS. Atom came into existence out of a need to improve RSS. (Refer: http://en.wikipedia.org/wiki/Atom_standardard)

In Asp.Net 3.5 frame work we can create subscription feeds with very minimal code using System.ServiceModel.Syndication namespace which contains all of the classes that make up the Syndication Object Model. For example below is a sample Blog class I am defining a public method and some properties to retrieve the blog items (I have hardcoded two items you can replace this from your database logic).

The next step I am going to create another class called Syndication Helper which converts our web content to syndication format.

Code Explanation

Uri uri = new Uri(“http://deepumi.wordpress.com”);

Configure your site url ( blog or news).

SyndicationFeed syndicationFeed = new SyndicationFeed();
Syndicaiton Feed class represent a top level of feed object, (you can add your blog name / site name with description and the last blog/site updated time).

List items = new List();
Syndication Item class represent a individual feed atom/rss.item object like item url, item description, item id, last updated etc. Here I am creating a syndicaiton item collection object which mapping from MyBlogList() method.

List oBlogList = Blog.GetMyBlogList();
foreach (Blog oBlog in oBlogList)
SyndicationItem oItem = new SyndicationItem(oBlog.Title,
new Uri(oBlog.Url),

Finally you are return the SyndicationFeed object to the aspx pages.
Now we need to render the atom and rss content in the aspx pages.

Create a new aspx page called rss.aspx and make sure there is no html markup in the page(just a blank page)

Code behind (RSS page)

Create a new aspx page called rss.aspx and make sure there is no html markup in the page(just a blank page)

Code behind (Atom page)

Hope this help and If you have any comments, please feel free to write your feedback.

You can download the entire article from here or copy paste this URL




Unleash the Marketing & Publishing Power of RSS

•Get all of your online content and marketing messages delivered to your receipients. No spam filters, no blacklists, no problems.
•Win back your customers and prospects by finally getting your messages through to them.
•Increase your natural search engine rankings and drive fresh traffic to your website.
•Get your content published on other sites, generating more visitors and exposure for your business.
•Ultimately, use RSS to increase your sales, develop profitable customer relationships and better monetize your online content.
•RSS publishing is easy and using some tools can even be free. You can start using it today without any cost whatsoever!
How Well-Known Marketers and Publishers Are Already Profiting from RSS

•BTI Communications Group: Search Engine Rankings
BTI Communications Group is a small VoIP solutions provider, but using RSS they acheived #1 search engine rankings for their most important keywords, such as voip solution provider on Google. While their larger competitors are investing in search engine campaigns, BTI is achieving top positions for free. They also increased the traffic to their corporate site for 75%.

•Lockergnome.com: Improved Clickthrough Rates
Lockergnome.com, one of the most popular tech sites on the Web today, used to distribute more than 400.000 e-mail newsletters weekly. Today, they have 5 times more RSS subscribers than e-mail subscribers and their RSS clickthrough rates are 500% greater than their e-mail clickthrough rates.

What is RSS?
RSS is a simple to use publishing tool for marketers and publishers, which allows you to easily get your internet content delivered to your subscribers and to other web media.
[to find out more about what RSS is, click here]

Up until now most internet marketing tools could be used only for a specific internet marketing activity (such as direct marketing, search engine marketing, business blogging, internet advertising, digital public relations, e-commerce, ...).

There has never before been a single tool to improve, enhance and power all of them, without prejudice.

But RSS is such a tool. Misunderstood by most marketers, overlooked by many end-users, it has the potential to power the entire internet marketing mix.

How Can RSS be Used by Marketers and Publishers
•Direct marketing
•E-zine publishing
•Public relations
•Monetizing online content
•Customer Relationship Management
•Internal and team communications
•Search engine optimisation
•Lead generation
•Online publishing
•And much much more ...

"Rok's book is the most comprehensive guide on RSS for marketers. A milestone document that clearly defines the role of RSS in the marketing mix and gives concrete instructions and tips regarding how to best leverage this powerful and game changing capability."

--- Dick Costolo, Feedburner"Rok, What you did is not fair! You've left everyone else nothing more on the subject of RSS to write about.

Now I understand why Pakii calls your book the 'best on the planet' - I agree. It is the most comprehensive, detailed and complete writing on the topic of RSS feed marketing and publishing I've read.

My notebook has tons of notes to myself, made while reading your book - in ONE sitting, lasting just under 4 hours. I simply couldn't stop. There'll be a lot of changes implemented soon on my various RSS feeds, thanks to what I picked up from your guide.

All success,

Dr.Mani Sivasubramanian
Author: How To Profit From RSS Feeds
http://www.RSS-Marketing.com""Hello Rok -

Just a note to say I love your material on RSS. (You have new fan here!) IMO, you do a wonderful job of explaining exactly how RSS can help grow a business . One of your articles several weeks ago prompted me to have a look at your site.

I bought both your "Unleash the Marketing and Publishing Power of RSS" and the [ competitive print book title removed from the letter ] book. From a marketing-relevant standpoint, your book blows the other out of the water.

Anyway, saw another of your articles come through today and thought I'd drop you a line.

Bobette Kyle
Marketing Plan and Web Promotion Information" Take a Look at Some Quick Examples of How Companies are Already Using RSS ...
•MarketingVOX is using RSS to deliver internet marketing news to their readers as it becomes available. Instead of having to wait to receive all the news in a single e-mail newsletter, RSS users get them as soon as they are ready.

•BTI Communications, a VoIP company achieved #1 search engine positions for their most important keywords in a highly staurated market, only using the power of RSS.

•Amazon.com is using RSS to announce their bestsellers and to help their users keep track of releases they are most interested in.

•Some affiliate managers already communicate with their affiliates using RSS.

•FindSavings.com uses RSS to deliver savings coupons and related information.

•Lockergnome uses RSS to provide visitors with the latest downloads and relevant software. Yet again other companies are using RSS to deliver product updates and patches directly to their customers, just as they become available.

•A few hundred content publishers are using RSS to deliver audio content, such as .mp3 interviews, “radio” shows and even audio messages to their customers.

•Textamerica.com allows people to post pictures, videos & text from their mobile phones and then make this content available via RSS feeds.

•Other companies are using RSS to deliver whitepapers and other educational content.

•One company uses RSS as a consulting billing awareness tool. The consultants create activity reports and the RSS feeds from the activity channels carry the billable information to the accounting staff for invoice preparation.

•Many internet publishers are using RSS to deliver their newsletters.

•Publish living digital catalogues of your products and provide your customers with your latest product releases, broken down by the categories they're interested in, and make it easy for them to order.

•Provide your affiliates and marketing partners with RSS feeds they can promote to their visitors to better promote your products and still make a commission. Amazon.com is already doing it. When are you starting?

•Create RSS autoresponders with scheduled messages, to keep in constant “marketing” contact with your prospects and slowly get them to the point of purchase.

•Provide limited-access content to your customers, employees, team members and even investors, without fearing other unwanted eyes.
Discover the Marketing Power of RSS Today
If this is enough to convince you that you need to implement RSS as part of your internet marketing strategy now, click here to order the "Unleash the Marketing & Publishing Power of RSS" e-book, acclaimed as the best and most comprehensive guide on RSS for marketers by leading RSS developers, marketers, experts and thought leaders. This is the only report on RSS that is fully supported by the RSS industry.

Your order is completely risk-free, as the e-book comes with a 90-day unconditional money-back guarantee.

If not, keep reading to find out more in-depth how you can benefit from RSS ...

New -- Just added to this package: a bonus 1 hour and 15 minutes RSS video on RSS Marketing for Beginners

A new video covering the basics of RSS marketing has just been added to the Unleash the Marketing & Publishing Power of RSS package.

Just over 1 hour and 15 minutes in length, the video covers everything from what RSS is, why it matters to marketers, what marketers can do with it to an in-depth explanation of the 7 key steps to RSS marketing success.

You will receive this video as a bonus gift with your order of Unleash the Marketing & Publishing Power of RSS.RSS in Detail
How RSS Will Increase Your Business Success
Improve Your Search Engine Rankings

RSS will increase your rankings for the most important search engines and at the same time, through RSS specific search engines and directories, generate new traffic for your web site.

It will generate completely new traffic for you and help you increase the power of your existing traffic sources.

It will get you listed almost immediately, even at directories like Yahoo!, and will get you #1 positions for your most important keywords and phrases.

And the best part: it's free and quick; takes less than a day to do.

100% Content Delivery

Forget about spam filters that are keeping your content away from your subscribers. RSS gets 100% of your content delivered. This works for direct marketing messages, e-zine publishing, customer support and so on.

With RSS you can even easily deliver daily or hourly news to your subscribers, and everything else as well. RSS will help you expand your content delivery to daily content updates, content updates by interest, content updates for different target audiences and so on. Use one RSS feed to deliver your daily news and the other to deliver in-depth articles, and so on...

And don't forget about the power of RSS personalization and autoresponder messages, which are already possible.

Discover New Marketing Opportunities

New times bring new marketing opportunities, and RSS is the leader in this area as well.

•Use it to increase the sales of your affiliates by providing them with RSS feeds to better promote your products.

•Launch your own RSS product feeds and digital catalogues (Amazon started publishing those not long ago) that bring your products directly to your recipient's desktops. Amazon is doing, but not many other people yet. Be among the first and get a lion's share of your target market.

•Market through branded RSS aggregators and establish a constant connection with your subscribers. It's just like having a branded e-mail client that your customers and prospects are using every day ... but much cheaper.

•Find innovative ways of delivering your ads and direct marketing messages directly to your audiences, making sure they are actually read.

•Autoresponders are a great marketing tool, but are becoming ineffective because your prospects just don't want to give you their e-mail addresses. RSS gives you this very same power, but without the fear people have with e-mail.

•Use RSS to market to your existing customers, affiliates, business partners and employees/team members.

•Publish your own "podcast", a special RSS feed, which carries audio. Perfect for your own audio "radio station" or for getting your voice to your readers, without having to worry about too large e-mail attachments. Podcasting got so big that not only every respected internet marketers is using it, but also huge corporations like GM.

•Use RSS to deliver latest posts and topics from your forums directly to your readers, to increase forum popularity and the quantity & quality of conversations.

Get Your Content Published On Other Web Sites

Get your content easily published on other web sites to reach new audiences and use their traffic to increase your own sales, as well as achieve greater recognition as an expert in your field.

Again, it's free and easy, and has the potential of bringing your content to thousands and thousands of new prospects, who are ready to buy now.

Generate New Subscribers More Easily

Internet users are reluctant to subscribe to any more e-mail newsletters, but because RSS is so easy to control they don't have any problems with subscribing to new RSS feeds that match their interests.

That means that by having an RSS feed you can raise your visitor-to-subscriber conversion easily.

Just imagine how converting more visitors in to subscribers will improve your long-term sales ... every additional subscriber you get means a new potential sales and a long-term relationship that could lead to dozens of sales on the long-term, especially if you convert him in to an affiliate.

If however you're not using RSS, these sales could easily be lost.

Don't Worry About Messages From Your Customers Not Reaching You

E-mail messages, yes, even those from your customers and their business enquieries, are often lost due to spam filters.

With RSS, no messages from your customers or prospects will ever get lost again. That means that you'll now capture every business enquiery and respond accordingly, turning it in to a real sale.

(For the rest, please click on the link in the title)


Do XML Sitemaps Actually Help?

By Wesley LeFebvre
Posted on April 14, 2010
Site-Reference News

I don't know about you, but I stopped worrying about using XML sitemaps on most of the websites I manage a long time ago. Frankly, I felt It was a complete waste of my time trying to keep them updated regularly. There was no noticeably difference in the way Google crawled each website, or indexed the updated pages. So I DON'T agonize over them anymore.

I think site-maps are a great idea, and maybe they'll be better in the future, but I honestly feel like site-maps have been more of a nuisance than anything. They give a false sense of security that a page will be indexed or updated in a timely manor. And from my experience, an XML sitemap submission does not guarantee much of anything.

If you have a website or pages you want to get crawled frequently, here are a few things you might want to put your focus on before you worry too much about your XML sitemap.

Add a blog to your website! I can't emphasize this enough. If you have a website, you need a self-hosted blog. Twitter is great, and so is facebook, but a blog brings people and the search robots to your website. Update it weekly, and you'll establish yourself as an authority, attract readers and links, plus Google will crawl your website for updated content more frequently.

Link to your important pages! Do you have several "important" pages many clicks into your website? If so, you need to bring them closer to your home page. If you have several links on your home page to the less important pages, you may want to rethink your navigation structure.

Get more links! If your website isn't being crawled very frequently, maybe you need more links. Link-building is still as important as ever. Don't ever underestimate the power of link-building.

Create a static HTML sitemap. A static sitemap is great because it helps users find the most important content on your website. Obviously, it will do the same for the search engine robots too.

Even if an XML sitemap helps get your pages indexed, it's not going to help much with your rankings. An important page that wouldn't have been indexed otherwise, isn't going to show up in the top of the search results if it isn't getting any PageRank. Don't get too excited about getting your pages indexed. Indexation doesn't equal ranking.

If you use a content management system like wordpress, you can try a sitemap generator. I haven't used it myself, but this one has over a thousand reviews, most of which are very positive.

In conclusion: If rankings are important to you, then finish optimizing your website before you worry too much about your XML sitemap. What has your experience been like using an XML sitemap? Has your experience been different than mine, or about the same? Leave a comment and let us know.

Wesley LeFebvre is the owner of Seattle Web Services, a Seattle-based search engine marketing company. For more of his great SEO tips, follow him on his popular SEO Rankings Blog.


How to explain RSS the Oprah way

back in skinny jeans

Today, I’m going to explain how RSS can help you live your best life online.

We all have busy lives with very little time. Web surfing is fun but can take hours going to visit every single website and blog you enjoy.

Wouldn’t it be fabulous if you could just get all the headlines of the most current stories from all your favorite websites and blogs in one place?

Well now you can, and it is called RSS feed.

The Oprah definition

The technical acronym for RSS is “Really Simple Syndication”, an XML format that was created to syndicate news, and be a means to share content on the web. Now, to geeks and techies that means something special, but to everyday folks like you and me, what comes to mind is, “Uh, I don’t get it?”

So, to make RSS much easier to understand, in Oprah speak, RSS stands for: I’m “Ready for Some Stories”. It is a way online for you to get a quick list of the latest story headlines from all your favorite websites and blogs all in one place. How cool is that?

Suppose you have 50 sites and blogs that you like to visit regularly. Going to visit each website and blog everyday could take you hours. With RSS, you can “subscribe” to a website or blog, and get “fed” all the new headlines from all of these 50 sites and blogs in one list, and see what’s going on in minutes instead of hours. What a time saver!

That one place where your RSS list is created is called an RSS Reader, and it gathers all the headlines from all the websites and blogs you have subscribed to. In a moment, I will describe how to get an RSS Reader.

Subscribing to RSS feeds

But first, to “subscribe” to a website or blog’s RSS feed simply means that you are telling that website or blog, “Yes please. Send me your story headlines.” It’s like subscribing to a magazine or newsletter. Instead of getting a magazine or email, you will just get a list of headlines sent to your RSS reader. If the headline looks interesting to you, all you have to do is click on the headline and you’ll be sent to the whole story.

In order to subscribe to a website or blog’s RSS, all you have to do is click on an RSS symbol like one of those shown in the diagram above, or a text link of the words “Subscribe to our RSS feed” on the website or blog. Typically, you can find these RSS symbols or text links in your browser window, on the sides of the website page, or on the bottom of the page.

The publishers of the websites and blogs really want people to subscribe to their RSS, so they will make it very easy for you to find the subscription links.

RSS Readers

Now, because nothing is ever standard on the web like dealing with different operating systems, Mac vs. PC, and different flavored browsers like Internet Explorer, AOL, Safari, and Firefox, the way to get an RSS reader will be dependent on what browser you like to use, and how accessible you’d like your RSS list(s) to be.

Just like there are flavors of web browsers, you may see and hear of different flavors of RSS XML feeders like RSS 1.0, RSS 2.0, and Atom. Again, the flavors are only important if you want to get techie. If you stick to looking for an RSS symbol like I have shown you in the diagram, you will be just fine.

If you’d like your RSS list to be accessible from any computer or mobile device you may have like a PDA, laptop, or cell phone, some popular RSS readers include (and almost all are FREE):

FeedDemon (this one costs money)
NewsGator (there is a cost for mobile accessibility)
Shrook (For Mac users. Free trial and then there's a cost.)
Attensa (more for enterprise, and there's a cost)

Update: If there are any other good RSS readers I've missed, please let me know and I will add them.

As you can see, there are a plethora of choices for you. All are good RSS readers, so your choice will simply come down to the style that appeals most to you.

RSS as Live Bookmarks

Browsers like Safari and Firefox allow you to subscribe to RSS feeds through the browser, and it’s called “live bookmarking”. Currently, you can only do live bookmarking in Internet Explorer if you have IE7 which is still in Beta. Oprah translation: Non-geeks cannot do live bookmarking in Internet Explorer because it’s not done yet. The limitation with using RSS in live bookmark form is that you only have access to your RSS list from the computer you created the bookmarks on. If you want the flexibility of complete accessibility, then I recommend going the RSS Reader route.

So there you have it. Are you now Ready for Some Stories? Enjoy!

This post is part of the ProBlogger "How to" Group Writing Project. Please visit Problogger for other wonderful "How tos."

TrackBack URL for this entry:


Making An RSS Feed

Making An RSS Feed
By Danny Sullivan, Search Engine Watch, Apr 2, 2003

Share RSS is a method of distributing links to content in your web site that you'd like others to use. In other words, it's a mechanism to "syndicate" your content.

To understand syndication, consider the "real world" situation where artist Scott Adams draws a daily Dilbert cartoon. The cartoon is made available to any newspaper that cares to run it, in exchange for a fee -- and 2,000 papers in 65 countries do so.

Unlike Scott Adams, syndication of web content via RSS is unlikely to make you rich. However, it can be an easy way to draw attention to your material, bringing you some traffic and perhaps a little net fame, depending on how good your information is.

What Is RSS?
How does RSS syndication work? Say you publish a new web page about a particular topic. You want others interested in that topic to know about it. By listing the page as an "item" in your RSS file, you can have the page appear in front of those who read information using RSS readers or "news aggregators" (explained more in my sidebar article, RSS: Your Gateway To News & Blog Content). RSS also allows people to easily add links to your content within their own web pages. Bloggers are a huge core audience that especially does this.

What does RSS stand for? There's a can of worms. RSS as introduced by Netscape in 1999 then later abandoned in 2001 stood for "Rich Site Summary." Another version of RSS pioneered by UserLand Software stands for "Really Simple Syndication." In yet another version, RSS stands for "RDF Site Summary."

History buffs might be interested that there's been some rivalry over who invented RSS. This is why we have both different names and indeed different "flavors" or versions of RSS. Mark Pilgrim's written an excellent article, What Is RSS, that charts the different versions with recommendations on which to use. I'll also revisit the version choice you'll need to make. But first, let's look more closely at some basics of what goes into any RSS file.

How Easy Is RSS?
I've been exploring RSS because it was time that Search Engine Watch offered its own stories in this manner. I've read several tutorials about making a feed, and they generally suggest that it is easy. They often offer code that you can "cut-and-paste" and link over to specifications that I actually don't find that clear.

For example, the RSS 2.0 specification has an "cloud" element that's optional but which a lay person might still wonder if they should use it. Meanwhile, heaven help the person who stumbles into the RSS 1.0 specification and its complicated RDF syntax.

Sure, making an RSS file IS easy for many. If you understand HTML, you'll probably understand enough to do a cut-and-paste from someone else's RSS file to make your own file. Don't know HTML? Start a blog, because several blogging tools automatically generates RSS files.

As for those non-technical people using WYSIWYG page building tools or personal home page building systems, have faith. Even you can build an RSS file from scratch, as long as you dispense with some of the extra features you probably don't need. We'll go through how to do this below. Later, I'll also mention some tools that will even do some or all of the work for you.

The RSS File
At the heart of an RSS file are "items." No matter what version of RSS you settle on, your file will have to include at least one item. Items are generally web pages that you'd like others to link to. For example, let's say you just created a web page reviewing a new cell phone that's being released. Information about that page would form an item.

To enter your item into the RSS file, you'll need three bits of information:


The title and description of your item need not match exactly the HTML title tag of the web page that the item refers to, nor the meta description tag, assuming you use these (don't know what they are? See my How To Use HTML Tags article). You can write any title and description that you think will describe the page. However, using your page's title and meta description tag certainly makes it easy to copy and paste to build your RSS feed.

In the case of our example page, let's say this is the information we settle on to define it as an item:

Nokia 3650 Combines Phone And Photos
I've been playing with the new Nokia 3650. Finally, someone has got the combination of a cell phone with digital camera capabilities right!

Now we have to surround that information with XML tags. These are similar to HTML tags, with the exception that unlike with HTML, there's no set definition of XML tags. Anyone can make up a particular XML tag. Whether it is useful depends on the program that reads the resulting XML file. In the case of RSS feeds, they have their own unique set of XML tags that are defined. Use these correctly, and then anything that reads RSS will understand your information.

Did that make your head spin? If so, don't reread -- just carry on to see how simple it is. First, open a text editor like Notepad. We're going to build our RSS file using it...

(For the rest of this highly useful but somewhat dated piece, please click on the link in the title above this article.)