473,323 Members | 1,550 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,323 software developers and data experts.

What's the difference?

I've got an application I'm converting from VB6 to C# 2005. I've
broken my problem down to this (Run on same machine seconds apart):

This works.

Dim dd As New DOMDocument
Dim pNodeList As IXMLDOMNodeList
Dim pNode As IXMLDOMNode

dd.async = False
dd.Load "http://rss.cnn.com/rss/cnn_topstories.rss"

Set pNodeList = dd.selectNodes("//item")
For Each pNode In pNodeList
Next pNode

This doesn't. I get a message that proxy authentication is required (I
didn't need it a second ago):

XmlDocument doc = new XmlDocument();
doc.Load(@"http://rss.cnn.com/rss/cnn_topstories.rss");
XmlNodeList rss = doc.SelectNodes("//item");
foreach (XmlNode r in rss)
{

}

What am I missing?

Thanks

Dec 21 '05 #1
5 1207
I was trying to find an example for you and came across this article. I hope
this helps:

http://groups.google.com/group/micro...f4157bfc4a9bba

Yosh
"Jeff" <je*******@mindspring.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I've got an application I'm converting from VB6 to C# 2005. I've
broken my problem down to this (Run on same machine seconds apart):

This works.

Dim dd As New DOMDocument
Dim pNodeList As IXMLDOMNodeList
Dim pNode As IXMLDOMNode

dd.async = False
dd.Load "http://rss.cnn.com/rss/cnn_topstories.rss"

Set pNodeList = dd.selectNodes("//item")
For Each pNode In pNodeList
Next pNode

This doesn't. I get a message that proxy authentication is required (I
didn't need it a second ago):

XmlDocument doc = new XmlDocument();
doc.Load(@"http://rss.cnn.com/rss/cnn_topstories.rss");
XmlNodeList rss = doc.SelectNodes("//item");
foreach (XmlNode r in rss)
{

}

What am I missing?

Thanks

Dec 21 '05 #2
See Ben Dewey's reply in the "Efficient way to firing event" topic. I think
he replied to the wrong post.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Subject: Re: Efficient way to firing event..... 12/21/2005 9:30 AM PST

By: Ben Dewey In: microsoft.public.dotnet.languages.csharp
In C# the \ char needs to be repleced with \\ meaning:

XmlNodeList rss = doc.SelectNodes("//item");

needs to be:
XmlNodeList rss = doc.SelectNodes("////item");
or
XmlNodeList rss = doc.SelectNodes(@"//item");

"Yosh" wrote:
I was trying to find an example for you and came across this article. I hope
this helps:

http://groups.google.com/group/micro...f4157bfc4a9bba

Yosh
"Jeff" <je*******@mindspring.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I've got an application I'm converting from VB6 to C# 2005. I've
broken my problem down to this (Run on same machine seconds apart):

This works.

Dim dd As New DOMDocument
Dim pNodeList As IXMLDOMNodeList
Dim pNode As IXMLDOMNode

dd.async = False
dd.Load "http://rss.cnn.com/rss/cnn_topstories.rss"

Set pNodeList = dd.selectNodes("//item")
For Each pNode In pNodeList
Next pNode

This doesn't. I get a message that proxy authentication is required (I
didn't need it a second ago):

XmlDocument doc = new XmlDocument();
doc.Load(@"http://rss.cnn.com/rss/cnn_topstories.rss");
XmlNodeList rss = doc.SelectNodes("//item");
foreach (XmlNode r in rss)
{

}

What am I missing?

Thanks


Dec 21 '05 #3
> See Ben Dewey's reply in the "Efficient way to firing event" topic. I think
he replied to the wrong post.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Subject: Re: Efficient way to firing event..... 12/21/2005 9:30 AM PST

By: Ben Dewey In: microsoft.public.dotnet.languages.csharp
In C# the \ char needs to be repleced with \\ meaning:

XmlNodeList rss = doc.SelectNodes("//item");

needs to be:
XmlNodeList rss = doc.SelectNodes("////item");
or
XmlNodeList rss = doc.SelectNodes(@"//item");


Correct, a backslash (\) needs to be "escaped", but this is NOT true
for a (forward) slash (/). So "doc.SelectNodes("//item");" is correct.

Hans Kesting
Dec 21 '05 #4
My fault that is correct. I get those confused sometimes.

Back to square 1...
Dec 21 '05 #5
Can you post the exact message you're getting?

Dec 21 '05 #6

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

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
1
by: mike | last post by:
best regards: What is the difference between DOM Level 1 and DOM Level 2. Thank you. May god be with you.
5
by: radnus2004 | last post by:
Hi all, I am not clear what is the difference between signed and unsigned in C. Many say, unsigned means only +ve values and 0. Can I use unsigned int i = -3? What happens internally ? What...
10
by: tinesan | last post by:
Hello fellow C programmers, I'm just learning to program with C, and I'm wondering what the difference between signed and unsigned char is. To me there seems to be no difference, and the...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
12
by: Nathan Sokalski | last post by:
What is the difference between the Page_Init and Page_Load events? When I was debugging my code, they both seemed to get triggered on every postback. I am assuming that there is some difference,...
3
by: Anoj Kumar | last post by:
Hi All , can anyone tell me what is the difference between the following declaration and how it affects application performance. 1. Dim cn As ADODB.Connection Set cn = New ADODB.Connection
6
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. What is the difference between a Field and a Property? Here is the context. In the VS.NET 2002 documentation, in the "String Members" section, we have the...
5
by: kai | last post by:
Hi, In ASP.NET , what is the difference between OnClick and Click events for a button? Because we have button click event, it can trigger events, why we still need OnClick? Please help. ...
49
by: Zach | last post by:
After having taken a looong break from VB (last used 6.0), I started getting back into programming again, this time with VS 2005. I began reading up on VB.NET from various sources (books,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.