list xml files residing in another web server

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 1
Reputation: chimbori is an unknown quantity at this point 
Solved Threads: 0
chimbori chimbori is offline Offline
Newbie Poster

list xml files residing in another web server

 
0
  #1
Jan 12th, 2009
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)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 521 | Replies: 0
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC