How to read XML data stream via a URL address into a string ?

F

fniles

I know how to read XML from a file.
But I will need to load the XML content from a URL, so when I go to the URL,
the result is XML file, and I will need to capture the content to a string.
How can I do that ?
Thank you.
 
T

Tom Shelton

I know how to read XML from a file.
But I will need to load the XML content from a URL, so when I go to the URL,
the result is XML file, and I will need to capture the content to a string.
How can I do that ?
Thank you.

Imports System.Net.WebClient

....

Dim wc As New WebClient
Dim xmlString As String = wc.DownloadString ("http://yoururl")
 
F

fniles

I am using VB and ASP, not .NET.
Is there a way to do do it in VB and/or ASP ?

Thank you.


I know how to read XML from a file.
But I will need to load the XML content from a URL, so when I go to the
URL,
the result is XML file, and I will need to capture the content to a
string.
How can I do that ?
Thank you.

Imports System.Net.WebClient

....

Dim wc As New WebClient
Dim xmlString As String = wc.DownloadString ("http://yoururl")
 
T

Tom Shelton

I am using VB and ASP, not .NET.
Is there a way to do do it in VB and/or ASP ?

Thank you.

Beats me... Better to ask on VB.CLASIC group:

microsoft.public.vb.general.discussion
 

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

Top