HTML5 Zone is brought to you in partnership with:

Kay Cichini (MSc, Biology), Nature Protection Expert, Tyrol/Austria. I'm author of theBioBucket-Blog, where I share examples for data management, data processing, statistical analysis and report generation using the R-Software. Kay is a DZone MVB and is not an employee of DZone and has posted 18 posts at DZone. You can read more from them at their website. View Full User Profile

Example Code for a Customized RSS-Feed

03.15.2013
| 1088 views |
  • submit to reddit

 A short code snippet for the customized RSS-Feed on this Google-Blogger site. I simply added the below code to a gadget to yield a tailored RSS-Feed in the sidebar. Most of the code was grabbed from the Google Code Playground.

.
 
 
<style type="text/css">
.gf-title {display:none;}
.gf-relativePublishedDate{font:9pt arial;}
.gf-snippet {font:10pt arial; padding-top:5px;}
.gfc-resultsHeader {display:none;}
</style>
 
<!--*******************************-->
 
<img src="http://www.alpinesicherheit.at/analyseberg/logo_landtirol_sw.jpg" alt="Land Tirol" align="top-left" border="4" height="40" width="40">
 
 
 
<script src="http://www.google.com/jsapi?key=AIzaSyA5m1Nc8ws2BbmPRwKu5gFradvD_hgq6G0" type="text/javascript"></script>
    <script type="text/javascript">
    /*
    *  How to use the Feed Control to grab, parse and display feeds.
    */
    
    google.load("feeds", "1");
    
    function OnLoad() {
      // Create a feed control
      var feedControl = new google.feeds.FeedControl();
    
      // Add feed.
      feedControl.addFeed("http://lwdweb.tirol.gv.at/produkte/llb/_today/LLBTirolRss.xml");
    
      // Draw it.
      feedControl.draw(document.getElementById("content"));
    }
    
    google.setOnLoadCallback(OnLoad);
    </script><script src="http://www.google.com/uds/?file=feeds&v=1" type="text/javascript"></script><link href="http://www.google.com/uds/api/feeds/1.0/77f89919ef841f93359ce886504e4e3f/default+en.css" type="text/css" rel="stylesheet"><script src="http://www.google.com/uds/api/feeds/1.0/77f89919ef841f93359ce886504e4e3f/default+en.I.js" type="text/javascript"></script>
  
  <span style="font-family: Arial; font-size: 1.2em; border: none;">
    <div id="content">Loading...</div></span>
<!--!doctype-->
Published at DZone with permission of Kay Cichini, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)