| | |
list xml files residing in another web server
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 1
Reputation:
Solved Threads: 0
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)
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)
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: DataGridView ComboBoxColumn Scenario!! Help!!
- Next Thread: Call exe or dll from MS SQL SERVER 2005
Views: 521 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net 2005 2008 access account application arithmetic array arrays basic bing button buttons c# center check checkbox code combobox component convert crystalreport data database databasesearch datagrid datagridview design designer dissertation dissertations dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy highlighting images inline insert installer intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project save searchbox searchvb.net select serial server soap sorting studio syntax table tcp text textbox time timer toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





