List Info

Thread: RSS enclosure tags




RSS enclosure tags
user name
2007-11-27 05:27:22
Hey I have a function here that's job is to update RSS feeds and then check for embedded 'enclosure' tags and obviously do something with the media it's able to access, however I can't seem to get it to work. Can someone help me?

public void vUpdateFeeds( )
       ; {
       ;     // Loop this function until the end of the RSS file: Done
 ;           try
   ;         {
                //Console.WriteLine( "Parsing of feeds disabled until further notice." );
 ;               int iTemp = 0;
                string sTemp = "";

   ;  &nbsp;   &nbsp;   &nbsp;  for ( int iterate = 0 ; iterate < FeedArray.Count ; iterate++ )
 &nbsp;   &nbsp;   &nbsp;   &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  sTemp = FeedArray[iterate].ToString( );
 ; &nbsp;  &nbsp;   &nbsp;   &nbsp;   &nbsp;  XmlTextReader RSS = new XmlTextReader( sTemp.ToString() );
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  //Console.WriteLine(&quot;&quot;, RSS.Title);
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  Console.WriteLine( "Feed no : .", ++iTemp, sTemp );
 ; &nbsp;  &nbsp;   &nbsp;   &nbsp;   &nbsp;  // Learn how XPath can be navigated

 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  do
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  RSS.Read()
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  // Need to find a way to now pull the download link from a feed
&nbsp; &nbsp;  &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  if ( RSS.Name == "enclosure" )  // Need to find out why enclosure ain't being detected
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  { &nbsp; 
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  Console.WriteLine( RSS.ReadString ( ) );
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  Console.ReadLine( );
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  }
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  //Console.WriteLine( RSS.ReadString ( ) );
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  } while ( !RSS.EOF );
 &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;  RSS.Close( );
 &nbsp;   &nbsp;   &nbsp;   &nbsp;  }
 &nbsp;   &nbsp;   &nbsp;  }
 &nbsp;   &nbsp;   &nbsp; 
 &nbsp;   &nbsp;   &nbsp;  catch ( Exception ex )
 &nbsp;   &nbsp;   &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;   &nbsp;  Console.WriteLine( ex.Message );
 &nbsp;   &nbsp;   &nbsp;  }
 &nbsp; &nbsp;   ; }
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )