Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 11th, 2010, 05:57 PM
Points: 1,561, Level: 16
Points: 1,561, Level: 16 Points: 1,561, Level: 16 Points: 1,561, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2005
Location: , , .
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Question ASP.NET XML Feed Error

I have an ASP.NET page that parses an external XML feed (please see example code below). It works...but when the feed goes down, it subsequently brings my site down. So I've created a default XML document that's located on my internal server a backup method when/if the external feed goes down. But I have no idea how to do this. If someone could let me know how to accomplish this, or point me in the right direction, that would be great. Thanks in advance.


Dim intSWACounter As Integer = 0
        Dim swa_xmld As New XmlDocument() 'Create the XML Document
        Dim swa_nodelist As XmlNodeList
        Dim swa_node As XmlNode
        Dim objShowWeatherAlert As Object = False
        'Check for active severe weather alerts
            'Load the Xml file
            swa_xmld.Load("http://www.weather.gov/alerts-beta/wwaatmget.php?x=COC035") 'LIVE: Example feed
            'What to do when it encounters an error
            swa_xmld.Load(MapPath("/mysite/docs/xml/weatheralert_down.xml")) 'DOWN
            'Include code to run, no matter whether the code throws an exception or whether it runs successfully
            'Get the list of name nodes
            Dim xnm As New XmlNamespaceManager(swa_xmld.NameTable)
            xnm.AddNamespace("atom", "http://www.w3.org/2005/Atom")
            swa_nodelist = swa_xmld.SelectNodes("/rss/channel/item[title != 'There are no active watches, warnings or advisories in Colorado (Douglas/COC035)']", xnm) 'LIVE
        End Try

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing RSS FEED in Asp.Net suresh_net RSS and Atom 0 August 8th, 2008 10:15 AM
ASP.NET XML Feed Error kwilliams ASP.NET 2.0 Professional 0 February 19th, 2008 05:41 PM
parse error xml load document asp.net academics2006 ASP.NET 1.0 and 1.1 Basics 0 March 13th, 2006 03:21 PM
xml feed with javascript jon8884 Javascript 5 June 22nd, 2005 01:15 PM
XML news feed sankar XML 1 December 17th, 2003 05:28 AM

All times are GMT -4. The time now is 05:19 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.