The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Problems Using ReadXml to Consume RSS

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic    
Flat View: This topic has 0 replies on 1 page
Doug Thews

Posts: 866
Nickname: dougthews
Registered: Jul, 2003

Doug Thews is a software developer/manager for D&D Consulting Services with 18+ years of experience
Problems Using ReadXml to Consume RSS Posted: Jul 17, 2003 12:08 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Doug Thews.
Original Post: Problems Using ReadXml to Consume RSS
Feed Title: IlluminatiLand
Feed URL: http://apps5.oingo.com/apps/domainpark/domainpark.cgi?client=netw8744&s=JETBRAINS.COM
Feed Description: A technology blog for people enlightened enough to think for themselves
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Doug Thews
Latest Posts From IlluminatiLand

Advertisement
I'm in the process of making an ActiveDesktop with a navigation frame to contain hyperlinks to the latest "favorite" RSS feed entries. I started by using the ReadXml method to load in the RSS feed from an XmlTextReader.

I compared my code with the only other 2 examples I could find: 4GuysFromRolla and tiberi.us. Their approaches on reading the data in differ. 4GuysFromRolla used the same XmlTextReader tact that I'd chosen, while tiberi.us used the HttpRequest/Http/Response method.

However, as I read through their examples I did find a significant problem as well as a problem with using the ReadXml tact. If you take a look at each of their code listings, both show the same snippet of code to get to the list of elements after loading them into the data set:
ds = new dataset
ds.LoadXml(url)
ItemTable = ds.Tables(2)
By using the ordinal value of 2, you're forcing the format of the element coming as the 3rd place element node in the document. Well, the MS feeds might work that way, but Schobleizer and a lot of other feeds don't (they have other elements like and others. So, my recommendation is to use the column name (albeit slower than accessing tables with an ordinal value):
ItemTable = ds.Tables("item")
Next, not all RSS feeds use the

Read: Problems Using ReadXml to Consume RSS

Topic: Rockets on Prisoner Award Previous Topic    

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use