philprice Posted March 22, 2003 Posted March 22, 2003 Right im getting an RSS feed, but i have two problems: a) It looks at child nodes of in item - how do i stop it b) It doesnt work Do While (XMLFeedInfo.MoveNext) Debug.WriteLine("Node: " + XMLFeedInfo.Current.Name + " -> " + XMLFeedInfo.Current.Value) If (CStr(XMLFeedInfo.Current.Name).ToUpper = "TITLE") Then feed.siteTitle = CStr(XMLFeedInfo.Current.Value) End If If (CStr(XMLFeedInfo.Current.Name).ToUpper = "LINK") Then feed.siteLink = CStr(XMLFeedInfo.Current.Value) End If Loop The XMLFeedInfo object is created by... '' Set which node path to look down for feed info (e.g. /channel) Dim XMLFeedInfo = docNavigator.Select(strFeedInfoNodePath) '' Where strFeedInfoNodePath = /rss/channel Example of the XML from http://diveintomark.org/xml/rss.xml <?xml version="1.0" encoding="utf-8" ?> <rss version="3.14159265359" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <channel> <title>dive into mark</title> <link>[url]http://diveintomark.org/[/url]</link> <description>A lot of effort went into making this effortless.</description> <dc:language>en</dc:language> <dc:creator>Mark Pilgrim (f8dy@diveintomark.org)</dc:creator> <dc:rights>Copyright 2003 Mark Pilgrim</dc:rights> <dc:date>2003-03-21T14:20:26-05:00</dc:date> <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.62" /> <admin:errorReportsTo rdf:resource="mailto:f8dy@diveintomark.org" /> <sy:updatePeriod>daily</sy:updatePeriod> <sy:updateFrequency>8</sy:updateFrequency> <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> <item> ...... I want to get /rss/channel/title and /rss/channel/link but the above code just wont work and i cant figure out why, any ideas? Quote Phil Price� Visual Studio .NET 2003 Enterprise Edition Microsoft Student Partner 2004 Microsoft Redmond, EMEA Intern 2004
*Experts* Nerseus Posted March 27, 2003 *Experts* Posted March 27, 2003 This doesn't necessarily answer your question, but it does appear to be related (it's a sample to extract RSS information): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml02172003.asp -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.