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

Valid xml to read from an xml file?

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

Dec 28 '05 #1
2 1008
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.

"Chumley Walrus" <sp*******@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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

Dec 28 '05 #2
You might try using XmlDocument.Load(...). Looks like you can pass a string
url as the parameter.

"Chumley Walrus" <sp*******@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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

Dec 28 '05 #3

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

Similar topics

23
by: James Aguilar | last post by:
Someone showed me something today that I didn't understand. This doesn't seem like it should be valid C++. Specifically, I don't understand how the commas are accepted after the function...
4
by: ad | last post by:
I have a xml, with a DTD to valid it: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE MyHealthData SYSTEM "Health.dtd"> How can I dertimate if a xml file is valid by program?
5
by: Sky | last post by:
What makes something a valid DataSource? What methods/iterators/etc? Why do I ask? I do understand that a DataSet is based on an XML structure...but it's too table structured for what I am...
5
by: Martin Eyles | last post by:
I get the following error:- c:\inetpub\wwwroot\ \analysis.aspx(1): Character is not valid. ^^^ (not a gap here, but I want to keep the folder name private) from the fist...
9
by: David Thielen | last post by:
Hi; What's the fastest way to verify that an xml file is well-formed (and valid if it has a dtd)? I don't want to pull any data out, I just want to make sure it is a good file. (When the user...
5
by: Joe Van Dyk | last post by:
I have a file that looks like this: 25.000000 55.000000 23.000000 51.000000 5 8 8700 6000 <and then, at byte 128, starts binary stuff> What's the proper way to make sure that I'm reading in...
3
by: LJB | last post by:
If I read a text file from disk into a stream how can I tell if it might already be valid XML? I'm writing an app to compare two XML files one of which may need conversion to XML first. My app will...
12
by: =?iso-8859-1?B?QW5kcuk=?= | last post by:
Other than installing PIL, is there a "simple" way using Python only to determine if a file is a valid image file? I'd be happy if I could at least identify valid images files for gif, jpeg and...
10
by: Academia | last post by:
I'd like to check a string to see that it is a valid file name. Is there a Like pattern or RegEx that can do that. 1) Just the file name with maybe an extension 2)A full path An help...
17
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.