473,549 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1214
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*******@mind spring.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.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.publi c.dotnet.langua ges.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*******@mind spring.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.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.publi c.dotnet.langua ges.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.SelectNode s("//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
14583
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 software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
1
8265
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
20588
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 conversion happens? Also on 32 and 64bit machines what happens? Can anybody explain?
10
15620
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 standard doesn't even care what a normal char is (because signed and unsigned have equal behavior). For example if someone does this: unsigned char a...
13
5014
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
17365
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, and I would like to know what it is so that I can take advantage of it in my code. Thanks. -- Nathan Sokalski njsokalski@hotmail.com...
3
3007
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
11238
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 following...
5
5837
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. Thanks kai
49
2400
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, internet, etc.) and found out about the CLR and how all of the .NET languages access it, the major difference being the syntax and structure of the...
0
7457
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...
1
7483
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7817
tracyyun
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...
1
5375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5092
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...
0
3504
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...
0
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
771
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.