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

0
springb2k (1)
12/28/2005 9:30:20 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
772 Views

Similar Articles

[PageSpeed] 39

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" <springb2k@yahoo.com> wrote in message 
news:1135805420.732543.172730@g49g2000cwa.googlegroups.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
>
> 


0
chris6851 (20)
12/28/2005 9:54:44 PM
You might try using XmlDocument.Load(...).  Looks like you can pass a string 
url as the parameter.

"Chumley Walrus" <springb2k@yahoo.com> wrote in message 
news:1135805420.732543.172730@g49g2000cwa.googlegroups.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
> 


0
peter4320 (19)
12/28/2005 10:02:10 PM
Reply:

Similar Artilces:

Lost Windows XP, Internet Explorer and supporting files
I somehow lost all my "Window" elements. Microsoft suggested that I try a "reinstall" which I did, but the problem was only 99% of the update downloaded and then it froze and now none of the Windows files work. Could not restore to earlier date as the download erased that option. I have been working with Microsoft and Dell to no avail. My main concern over wiping everything out and reloading from the Recovery Disk is that I will lose my "personal videos/pictures" and these can't be replaced. I've tried to download them on CD, uploadin...

Msgbox entry validation
The following Macro will not loop more than twice the error entries. Will someone help me correct it to loop indefinely? Thanks Sub Entry_validation() Dim Teststring As String Dim Inputstring As String Cells(1, 1) = "ABC" 'as given filename Cells(2, 1) = "DEF" 'as given filename Cells(3, 1) = "GHI" 'as given filename Cells(4, 1) = "JKL" 'as given filename errorloop: Inputstring = InputBox(prompt:="Enter Filename" & vbLf & "Enter abort to abort en...

jpg files attached to sent mail
I've been told that recipients of my emails are getting two jpg files attached to my email. When opened they are almost blank. One has a white rectangle that looks like it could be a signature template. The other simply has a black dot. What are these files and how do i remove them so my mail recipients aren't bother by tyem? Thanks are you adding a signature? Do you use a header/footer in word? the small one is likely a bullet used in either the header or signature. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? h...

Data Validation -> Validation list is larger than the cell width
I have a workbook that I've just added data validation to one cell. FWIW, the data validation is based on a named range. Here's the (perceived) problem. When I've set up data validation in the past, the selection is the same width as the cell. In this case, the list starts almost a full cell width to the left. What am I missing? Thanks, Barb Reinhardt Barb, In Excel2003 I can replicate what you describe under the following conditions: 1. the named range contains entries that are wider than the data validation cell 2. The data validation cell is r...

Importing Delimited Files
I'm trying to import data that is in a delimited format and I'm wondering if Access can do what I'm needing. The file starts out with a header section seperated by asterisks. After coming to a specific set of letters in the file there will be information that belongs under that header. This will be seperated by both * and ~. The file will continue on and have another header section followed by more information belonging with the second header. I'm needing to import several files into Access, sort them to match their appropriate header (information belonging to a cert...

Parsing XML in string variable?
I have a method that returns a string that contains XML, and I need to parse that string (ie. find specific keys). How can I do this? I found one that searches a Stream, but I don't know how to convert from string to stream. Thanks. hi vmi, you could use the System.Xml.XmlDocument class, simply make a new instance and use the LoadXml-Method (does not properly load string with encoding markers). You could also use the .NET 3.5 System.Xml.Linq.XElement. There are several utility classes to read from strings and streams and vice versa, e.g. System.IO.StringReader &am...

Synchronizing .PST Files Between Multiple Computers
Hi Folks! What is the best way to keep two different .PST synchronized between two different computers? Currently, I have a Exchange account at work and a personal folder file with my personal calendar, contacts, etc. I, periodically, export the Exchange stuff to a .PST file and my personal .PST and bring it home to my computer there. I, periodically, export to the personal .PST file and then bring it back to work and import it there. Is there a better way to do this so that I don't have to keep importing/exporting all the time. Thank you very much! - Lawrence Lawrence &l...

Insert XML string into XML File: Part 2
Thanks to some good help from a previous post, I have been able to create well formed xml as part of a report logger app. However, I still have a small problem. When I add new xml to the log file, the new nodes are appended to the original file. What I really want is for the log file to grow as "report nodes" are added. Also, I am a bit concerned about performance, particularly as the file grows in size. I must write to an xml file (vs. a database) and am trying to understand the best way to do this. I prefer to not use "temp files" and would like to just modify the ...

Validating against a DTD
Hello All, I am trying to validate an xml file against a DTD. I went through a lot of examples especially: http://www.xmlforasp.net/codebank/util/srcview.aspx?path=../../codebank/System_Xml/XmlValidatingReader/Validator/validator.src&file=validator.cs&font=3 but its not working in my case. First of all, when i try to add my DTD file in XmlSchemaCollection object, it throws an error saying DocType element is expected. I am using NITF DTD for this and there is no DocType element in it. Any help will be appreciated. Thanks. VD You should not add DTDs to XmlSchemaCollection. XmlSchema...

XML Tree Structure
Hi Folks, I would like to take a XML document and write its data into a tree structure for a custom tree control. The document has two fields with one called task (a text field) and the other called tree_level (an integer field). Consider the document to be valid and well-formed. The tree_level is an index describing where a node will reside in a tree structure. A partial view of the XML document is as follows: <task>summary task</task> <tree_level>0</tree_level> <task>task1</task> <tree_level>1</tree_level> <task>task2</task&...

Outloo reads aloud emails
I have Outlook 2002 installed. I usually send an email by using the key combination Alt/S but occasionally, instead of the email being sent, a voice starts reading aloud the email I have written. Now I have tried all sorts of Alt key combinations to make it happen on purpose but it won't so my question is, what is happening, why, and can I use the speech recognition program in other MS products? Regrds, Lloyd sounds like you are enabling narrator. look in accessories on the start menu. If it's not that, then it could be speech - look in control panel for the lauguage applet. --...

Validation dropdown list is not coming visible
Hi, I'm using XP and 2003. I have a problem that I have once found resolution, but now it came again and cannot remember what needs to be done. Here is the problem: There is a column where Validation is specified in right manner with error message in case of error. When selecting the cell - dropdown list is not coming visible. In case I write something wrong it gives error message. If I recall correctly - it was something to do with some kind of list. How can I change this to work properly? I tried to paste new column from another file where the column is working as I want...

Data Validation
Hi all I want to set data validation on a cell so that it will accept the following (and only the following) text strings: (1) "BR" (literally) or (2) "NT" (literally) or (3) "nA" where n is any positive integral numerical value including zero and A may take any of the values "L", "P", "T", "V" or "Y" or (4) "An" where n is any positive integral numerical value including zero and A may take either of the values "K" or "D". Is this possible, please, and if so how? thanks -- Return e...

[ANN] Liquid XML Studio Released
Announcing the release of Liquid XML Studio 2008 a Freeware XML Development Environment. Download available from www.liquid-technologies.com. Key features include - An Advanced Graphical Schema Editor - XML Editor, with auto-complete, syntax highlighting & validation - Web Service Browser, supports calling Soap services - XPath Expression Builder, visualise XPath expressions - Documentation Generator, HTML Docs from your XML schemas - Code Generation, C++, C#, .Net, Java, VB .Net & VB6 (trial) Liquid XML...XML the smart way! ...

trying to open old publisher files in Publisher 2003
I have old files from Windows version of publisher that I am grying to open up in Publisher 2003 Windows XP Anything below Publisher 95 will not open in 2003, all other versions will. Do you have Norton? How to use Office programs with the Norton AntiVirus Office plug-in http://support.microsoft.com/kb/329820/en-us -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Pat's problem" <Patsproblem@discussions.microsoft.com> wrote in message news:02D08C15-9386-48C6-B111-76AFAEF617FC@microsoft.com... >I have old file...

Outlook 2003 Archival
Hello, I have auto archive set on all users desktops on my LAN. I can not rely on the users to archive, or to save that file to their users folder. So I have all outlook 2003 on the LAN to run every 14 days, archive or delete mail greater than 6 months. For people that need mail greater than 6 months, I save the archive.pst file to a local server of mine this way it gets backed up nightly. I know this is not supported by MS as there can be corruption in the file, but ----- I really have no choice, it can not stay on their desktop (no backup), and for them to move the fi...

reinstall-validation problem
Hardware hit from lightning so new hd and video card and start over. All goes well with install using a slipstreamed XP-Pro SP3 disk but I notice it never asks for the Product Key during install yet it Activates itself during one of the boots and I think little of it until ... During the updates which followed (100+!!!) I notice Windows Defender doesn't seem to run or leave itself installed. As it is running on my laptop figured I just download it. When I run it, it wants to first do the Genuine Advantage bs which I let it, at which time it says "bogus". Ugh, g...

Validation
Julie the same can be achieve without going thru the double drop down boxes. You could do it just using the combobox alone. Thank again Please stay in the ORIGINAL thread. The archives will thank you. -- Don Guillett SalesAid Software donaldb@281.com "JLong" <anonymous@discussions.microsoft.com> wrote in message news:034101c49c3b$889b5020$a501280a@phx.gbl... > Julie the same can be achieve without going thru the > double drop down boxes. You could do it just using the > combobox alone. Thank again ...

how can I know if a file is opened?
Hi, How can I know if a file is opened? if it is a EXE file, how can I know if it is running? thanks a lot, larry You could try to open the file exclusively. If that fails, you know that the file is open someplace else. As far as a running process, have you checked into Process32First/Process32Next? "larry" <xxx@yyy.com> wrote in message news:dPrCc.830048$Pk3.303606@pd7tw1no... > Hi, > > How can I know if a file is opened? > if it is a EXE file, how can I know if it is running? > > thanks a lot, > larry > > thanks a lot, I will try that. ...

Data Validation
I have set up a data form and have data validation rules on the various input cells. I see that there is an option called "Ignore blanks" in the data validation settings, which is supposed to restrict someone from entering past an input cell without entering valid data, if the "Ignore blanks" box is unchecked. I have tried to do this, but it does not seem to work. Please could someone tell me what I am doing wrong? Provide information, or better yet, a screen capture of the Data Validation dialog box with the Setting tab selected (User ALT+PrintScreen to copy the imag...

Removing queue read privilege: assign to another user
If you remove the Queue read privilege from a security role then you would expect the users assigned this role to: - Not see the queues area on left Nav - Not be able to assign records to queues - BUT, they should still be able to assign records to other users The final point above is not the case. You get a permissions error when trying to assign to a user. To explain another way: Take the ‚ÄúCustomer Service Representative‚ÄĚ out of the box security role. Change the Queue read privilege to none. Give a user just this security role and they will not be able to...

Drop'n'drag multiple files?
How do I see in my MFC SDI OnOpenDocument(LPCTSTR lpszPathName){} that I intend to open multiple files (either from drag'n'drop) or from an opendialog? You don't from OnOpenDocument(). This method only opens one file at a time and should be called once for each file. The problem is that the CCommandLineInfo class only reads and opens a single file from the command line. I had to modify this class (or, rather, derive from it) to make it handle multiple files). -- Jonathan Wood SoftCircuits http://www.softcircuits.com "Michael Archon Sequoia Nielsen" <mnielsen@...

validating macro
Hi I am sending a spread sheet out to branchs I need them to complete a sheet (common info) before they do anything else on the workbook. I am looking for a macro or code for VBA which who check (common info) see if the cells are complete if not bring up a error screen informing the user to complete the form and then take them straight to the (common info) sheet. and if possible let them go to the tab which they want to go to. Use an extended version of something along these lines: (if there are lots of cells use a 'for row numbers x to y' or 'do until' statment, o...

How Do I parse this XML document, most efficiently?
What would be the best way to parse this XML document? I want to avoid using XMLDocument. I don't know if I should use XMLTextReader, or Xpath classes. There is only one element <MessageStore> element in the document, "always" at the end of the document. There will be thousands of <Messages> elements, "always" before <MessageStore> element. 1st Step ===== I need to get the <PR_STORE_ENTRY_ID> data "first". There will always only be one MessageStore element, with one child containing data. 2nd Step ====== I then need all the data from...

XML syntax as string
Hi I am trying to define string xml="<?xml version="1.0"?>"; But it gives error messages. Can any help me define <?xml version="1.0"?> as string... Thanks in advance Rahil string xml="<?xml version=\"1.0\"?>"; I hope it helps. >-----Original Message----- >Hi >I am trying to define >string xml="<?xml version="1.0"?>"; > >But it gives error messages. Can any help me define > ><?xml version="1.0"?> as string... > >Thanks in advance > >...