use zUtil;


sub scienceBlogHandler
{
   $html = shift;
   my( @rValue ) = ();
   my( $count, $item );
   my( $done, $title, $link, $desc );

   #print "=------------------ science blog rss handler --------------------=\n";
   #print "xml: $html\n";

   $count = 2;
   $item = zUtil::getNthItemNew( $count, $html, "<item", "</item>" );
   while( defined( $item ) )
   {
       if( $item =~ /<title>(.*?)<\/title>.*?<link>(.*?)<\/link>.*?<description>(.*?)<\/description>/gsi )
       {
           $title = $1;
           $link = $2;
           $desc = $3;

           print "title: $title\n";
           print "link: $link\n";
           print "desc: $desc\n";

           push @rValue,
           {
	           'headline' => $title,
	           'url'  => $link,
	           'desc'  => $desc
           };
       }
        
        $count++;
        $item = zUtil::getNthItemNew( $count, $html, "<item", "</item>" );
        if( $item =~ /^$/gsi )
        {
            $item = undef;
        }
     }

   return @rValue;
}

return 1;

