Results 1 to 3 of 3
Thread: hmmm... xmlDocument.Load issue
Oct 26, 2006, 10:10 #1
hmmm... xmlDocument.Load issue
SOmetimes i wander why i do this. You can have everything working just like you want, then all of the sudden, something that previously worked, now fails.
Does anyone know why:
XmlDocument pgaNews = new XmlDocument(); pgaNews.Load("http://www.pgatour.com/partners/feeds/rss/home_news");
i have called the System.XML class, and i have varified that the address above contains xml data.
This worked fine yesterday. didn't touch....move....alter in any form or fashion and now today for some reason i get this error.
when i comment out the second line, the application runs (obviously without this part of the page, but it runs nonetheless) without exception.
Oct 27, 2006, 08:25 #2
And today it works.....
the internet is a wierd wierd world.
Oct 27, 2006, 10:06 #3
- Join Date
- May 2003
- Washington, DC
- 4 Post(s)
- 0 Thread(s)
That would be the ole 'net.
I would definitely wrap the loading call in a try-catch of some sort; you are dealing with an external resource which can easy become unavailable without warning, and you had best be able to deal with it gracefully.