Groups | Blog | Home
all groups > dotnet xml > december 2005 >

dotnet xml : Valid xml to read from an xml file?


Chumley Walrus
12/28/2005 1:30:20 PM
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
Chris Lovett
12/28/2005 1:54:44 PM
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.

[quoted text, click to view]

Peter Rilling
12/28/2005 2:02:10 PM
You might try using XmlDocument.Load(...). Looks like you can pass a string
url as the parameter.

[quoted text, click to view]

AddThis Social Bookmark Button