Valid xml to read from an xml file?

C

Chumley Walrus

I'm using vb.net, i get an error at the reader line saying the remote
server can't be found. Is the below even valid?

dim reader as XmlTextReader
reader = new XmlTextReader ("http://www.mysite.com/my.xml")
do while (reader.Read())
'do some action here
response.write(reader)
loop


thanx
chumley
 
C

Chris Lovett

XmlTextReader uses System.Net.WebRequest under the covers -- see if you can
figure out how to create a connection that way. Usually there's some proxy
server information missing that you can enable if you use WebRequest
directly, and then pass the result of GetResponse().GetResponseStream() to
the constructor of XmlTextReader.
 
P

Peter Rilling

You might try using XmlDocument.Load(...). Looks like you can pass a string
url as the parameter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top