473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

RSS Driving Me Mad!

I'm trying to read a RSS feed.
It works somewhat OK on some feed, while it craches on others :-/

What am I doing wrong(besides from all)?
Am I looking for the wrong thing?

<code>
Dim dsPubs As New Data.DataSet
Dim xdcDOC As New Xml.XmlDocument
Dim i As Integer = -1
Dim tblItem As Integer = -1
Dim colTitle As Integer = -1
Dim colLink As Integer = -1

dsPubs.ReadXml(TreeView1.SelectedNode.Text)

For i = 0 To dsPubs.Tables.Count - 1
If dsPubs.Tables(i).TableName = "channel" Then tblItem = i
Next
If tblItem = -1 Then Exit Sub '// Not found!?

For i = 0 To dsPubs.Tables(tblItem).Columns.Count - 1
If dsPubs.Tables(1).Columns(i).Caption = "title" Then
colTitle = i
ElseIf dsPubs.Tables(1).Columns(i).Caption = "link" Then
colLink = i
End If
Next
MsgBox(colTitle & vbNewLine & colLink)
</code>

----
Tim
Nov 21 '05 #1
2 911
> For i = 0 To dsPubs.Tables.Count - 1
If dsPubs.Tables(i).TableName = "channel" Then tblItem = i Next


For RSS
2.0 /rss/channel/ is the xpath for the channel element - but make sure that the
feed you are reading is rss and not atom, which doesn't have a channel element
(its called title there).

Regards,
Lance R.
/n
software
http://www.nsoftware.com/

-

Nov 21 '05 #2
<la****@nsoftware.removeme.com> wrote
For RSS
2.0 /rss/channel/ is the xpath for the channel element - but make sure that the feed you are reading is rss and not atom, which doesn't have a channel element (its called title there).


Well that explains whay it only worked with some sites.
I got it now.

Thanks

----
Tim
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jim | last post by:
I really hope someone can help me with the below problem. It's driving me insane. I have a form with two combo boxes (say, combo1 and combo2) and a list box (listbox1). When the user selects a...
1
by: Matt | last post by:
OK, this has me mad and totally stumped. I have a query that queries one Oracle table (linked). I wish to limit the query on the PROBLEM_ID record by using a value enter via a form. I have a...
2
by: Grey Knight | last post by:
Here's a problem which is driving me slowly insane. Using GCC version 3.3.1 on SuSE 9.0, I keep getting "undefined reference to `function'"-type errors for no apparent reason! It's driving me...
12
by: Marty | last post by:
It seems all of the sudden that user controls that contain images are referencing image sources relative to the document that I drop the control on. This obviously does not work beacuase the...
3
by: andyjgw | last post by:
Hi I posted this in the caching section, before noticing that it appears to be a practically dead NG, so please excuse the x-post... Can anyone advise on this please? Something is happening...
0
by: apa7hy.spam | last post by:
this message was originally posted by someone else and closed without a proper answer. i'm reposting it in hopes that someone will provide a solution. Begin Quote: "I'm attempting to play...
1
by: soeter04 | last post by:
Hey there, I'm having trouble with an (at first sight) easy layout: Basic layout: 3 rows: - top bar (fixed height) - middle frame (max height between bars) - bottom bar (fixed height) In...
7
by: John Harrison | last post by:
This is from SGI's FAQ, its the justification for why list<T>::size() is linear time in their library (and in gcc library too since their code is based on SGI) <quote> Why is list<>::size()...
3
by: metamind | last post by:
I have a string called "s" which contains "problems once you\x19ve secured the job!)." I am trying to replace the \x19 character with "ww" in this case but s.replace(/\x19/g, 'ww') is just...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.