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

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top