[MonoDevelop] RSS enclosure tags

Neil Munro neilmunro at gmail.com
Tue Nov 27 06:27:22 EST 2007


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 = "";

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

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

            catch ( Exception ex )
            {
                Console.WriteLine( ex.Message );
            }
        }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20071127/ac31142f/attachment-0001.html 


More information about the Monodevelop-list mailing list