Question list xml files residing in another web server

chimbori

New member
Joined
Jan 12, 2009
Messages
1
Programming Experience
1-3
hello,
i am using .net 1.1,vb ,i have 2 web applications.one is installed in client side server which is currently working offline(intranet)..other is at my side which is online website.frequently i have to give master data to client .So using httprequest and xml , i am giving him data.I have given one option to client side application from where he connects to online application and fetches the data.
now the problem is that he is asking for previous xml files also
so i have to display him the list of xml files in a listbox from where he can choose any file and retrive the data to sql database..
I am using following code for fetching one file at a time :

Dim objResponse As HttpWebResponse
Dim Myuri As New Uri("http://website/xxx.xxx.xxx.xxx/files/xmlfile.xml")
Dim objRequest As WebRequest = WebRequest.Create(Myuri)
Dim objStreamReader As StreamReader
Dim SB As New StringBuilder
dim ds as new dataset
dim dt as new datatable
Dim XW As New XmlTextWriter(New StringWriter(SB))

objResponse = CType(objRequest.GetResponse, HttpWebResponse)

objStreamReader = New StreamReader(objResponse.GetResponseStream())

Dim xmlRepDoc As New XmlDocument
xmlRepDoc.Load(objStreamReader)

xmlRepDoc.WriteTo(XW)
XW.Close()
ds.ReadXml(New StringReader(SB.ToString))
dt = ds.Tables(0)
:)
 

Latest posts

Back
Top