Hello,
I am using the following to get RSS Feeds. I've been able to get the xml
files from every site except CNN. When I try to get there feed, I get the
exception:
A column named 'link' already belongs to this DataTable: cannot set a nested
table name to the same name.
Any help with this would be appreciated. Thanks, sck10
try
{
WebRequest req =
WebRequest.Crea te( http://rss.cnn.com/rss/cnn_topstories.rss);
// Get Website Proxy
req.Proxy = new WebProxy("globa l.proxy.lucent. com:8000", true);
req.Proxy.Crede ntials = CredentialCache .DefaultCredent ials;
WebResponse resp = req.GetResponse ();
// Stream the data
StreamReader textReader = new StreamReader(re sp.GetResponseS tream());
XmlTextReader xmlReader = new XmlTextReader(t extReader);
//XmlReader rssReader = new XmlTextReader(r ssUrl);
// Build Dataset
DataSet dsRSS = new DataSet();
dsRSS.ReadXml(x mlReader);
// Populate Repeater Tool
rptRSS.DataSour ce = dsRSS.Tables["item"];
rptRSS.DataBind ();
}
catch(Exception ex)
{
this.pnlMessage .Visible = true;
this.lblMessage Title.Text = "RSS Feed Error";
this.lblMessage Text.Text =
"<span class=BlkB>Reco rd Not Found</span><br />" +
"Problems consuming RSS Feed for" +
"<br /><br /><span class=BlkB>RSS Feed Error</span><br />" +
ex.Message.ToSt ring();
} 5 9364
Hi sck10,
RSS feed is valid xml, but not necessary valid for a dataset.
If your purpose is to display RSS feeds on your webpage, I would recommend
some well built custom controls:
#RssFeed http://scottonwriting.net/sowBlog/RssFeed.htm
#Awesome ASP.NET 2.0 RSS Tool-Kit http://weblogs.asp.net/scottgu/archi...22/438738.aspx
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks Walter,
"Walter Wang [MSFT]" <wa****@online. microsoft.comwr ote in message
news:RD******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi sck10,
RSS feed is valid xml, but not necessary valid for a dataset.
If your purpose is to display RSS feeds on your webpage, I would recommend
some well built custom controls:
#RssFeed http://scottonwriting.net/sowBlog/RssFeed.htm
#Awesome ASP.NET 2.0 RSS Tool-Kit http://weblogs.asp.net/scottgu/archi...22/438738.aspx
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your
reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.
Hi Walter,
I downloaded the RSS Toolkit. Do you know how to set the web proxy for
this?
Thanks,
sck10
"Walter Wang [MSFT]" <wa****@online. microsoft.comwr ote in message
news:RD******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi sck10,
RSS feed is valid xml, but not necessary valid for a dataset.
If your purpose is to display RSS feeds on your webpage, I would recommend
some well built custom controls:
#RssFeed http://scottonwriting.net/sowBlog/RssFeed.htm
#Awesome ASP.NET 2.0 RSS Tool-Kit http://weblogs.asp.net/scottgu/archi...22/438738.aspx
Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your
reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.
Hi sck10,
Currently the toolkit didn't expose a method or property to let you specify
a proxy when it downloads the rss. Fortunately, we have the source code so
it should be easy to add this. In RssDownloadMana ger.cs:
RssChannelDom DownloadChannel Dom(string url) {
// look for disk cache first
RssChannelDom dom = TryLoadFromDisk (url);
if (dom != null) {
return dom;
}
// download the feed
byte[] feed = new WebClient().Dow nloadData(url);
You can refer to WebClient.Proxy documentation on how to add proxy support:
#WebClient.Prox y Property (System.Net) http://msdn2.microsoft.com/en-us/lib...ent.proxy.aspx
Please let me know if you need more information on this.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks Walter.
Regards, sck10
"Walter Wang [MSFT]" <wa****@online. microsoft.comwr ote in message
news:Ka******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi sck10,
Currently the toolkit didn't expose a method or property to let you
specify
a proxy when it downloads the rss. Fortunately, we have the source code so
it should be easy to add this. In RssDownloadMana ger.cs:
RssChannelDom DownloadChannel Dom(string url) {
// look for disk cache first
RssChannelDom dom = TryLoadFromDisk (url);
if (dom != null) {
return dom;
}
// download the feed
byte[] feed = new WebClient().Dow nloadData(url);
You can refer to WebClient.Proxy documentation on how to add proxy
support:
#WebClient.Prox y Property (System.Net) http://msdn2.microsoft.com/en-us/lib...ent.proxy.aspx
Please let me know if you need more information on this.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Blink |
last post by:
I'm using the XmlTextReader class to parse an XML feed. I need to search for
elements that may or may not be there; for example, if there was an error
with my request the XML will contain an <error> element. If there was
nothing wrong this element won't be in it. My problem with this is that
after searching through the XML the first time looking for the <error>
element using the XmlTextReader.Read() method, I can't search for any other...
|
by: RJN |
last post by:
Hi
I'm using XMLTextReader to parse the contents of XML. I have issues when
the xml content itself has some special characters like & ,> etc.
<CompanyName>Johnson & Jhonson</CompanyName>
<EmployeeStrength>> 1000</EmployeeStrength>
When I do a Xmltextreader.read() and then check the contents of the xml
node by XmltextReader.ReadString(), I get an exception when I have
|
by: Nathan Alden |
last post by:
I have an XSD defined as the following:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Application">
<xs:complexType>
<xs:sequence>
<xs:element name="ReceivedDate" type="xs:string"/>
</xs:sequence>
|
by: Rik Brooks |
last post by:
I've been working on this all day and finally I surrender. What I'm trying to
do should be simple, I think.
I'm trying to read an rss feed from cnn and use that to populate an asp.net
table (server side). All I want is the one liner for each article and the url
to it. I'll then bottle the whole shebang up in a hyperlink and throw it in
my table.
I do this by binding a dataset to an xmlTextReader. Experimenting I found
that I could get...
|
by: Slonocode |
last post by:
Is there any relation between the NodeType and the Text when using the
XmlTextReader?
The documentation uses select/case while using the xmltextreader.
While reader.Read()
Select Case reader.NodeType
Case XmlNodeType.Element
Console.Write("<{0}>", reader.Name)
Case XmlNodeType.Text
| |
by: RJN |
last post by:
Hi
I'm using XMLTextReader to parse the contents of XML. I have issues when
the xml content itself has some special characters like & ,> etc.
<CompanyName>Johnson & Jhonson</CompanyName>
<EmployeeStrength>> 1000</EmployeeStrength>
When I do a Xmltextreader.read() and then check the contents of the xml
node by XmltextReader.ReadString(), I get an exception when I have
|
by: Jimmy |
last post by:
Hello,
If I want to check in C# code that if there is a & in my string variable
using
RegExp, how should I inform RegExp about &-char? Is just &, \&, & or
something else? I have strucled with this small issue two days and I still
not
sure how C# accpets &-char in Regular Expresions.
Can anyone help?
|
by: Goran Djuranovic |
last post by:
Hi all,
I ran into a problem where my XMLTextReader fails on .Read() when I have "<" character in one of the attribute's values. What I am trying to do is replace illegal characters ("<", "&" , etc.) with legal stuff ("<", "&", etc.), before I send the XML text to a SQL Server stored procedure. Currently, I am using XMLTextReader and StringWriter to do this, here is the piece of code that fails:...
|
by: TheDude5B |
last post by:
hi,
I have a function which reads the xml from a web url into the
XmlTextReader, and then I work my way through the reader producing
html from the different nodes. All the code works fine when I debug
the project, but when I publish the project and run it on a live
server, I seem to be getting problems.
I get the error:
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |