I am having a problem reading an Xml file and loading it into a dataset in
VB.net (ASP).
I seem to be able to load the remote file from the Url but once in memory I
cant manage to load it in to a dataset.
The readXml appears to want to read a file rather than a variable and I'm
not sure how to get around this issue.
I've tried loading to a file stream and converting the strFile to an
XmlDocument but this doesn't appear to get me any further.
I known the code at the bottom doesn't work I have listed it to put over the
idea of what I am trying to do.
Martyn Fewtrell
mf*******@networkclub.co.uk
--------------------------------------------
'get data
Dim Url As String = "http://www.url/file.xml"
Dim Request As HttpWebRequest
Dim Response As WebResponse
Dim strFile As String
Try
Request = CType(WebRequest.Create(Url), HttpWebRequest)
Response = Request.GetResponse()
litError1.Text = "Response Recieved"
Catch ex As Exception
litError1.Text = "Response Not Recieved"
End Try
'load Dataset
Dim ds As DataSet = New DataSet
ds.ReadXml(strData)
----------------------------------------------------------------------------