473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

list xml files residing in web server

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)
Jan 7 '09 #1
3 1454
r035198x
13,262 8TB
Just read the directory containing the XML files and put all the files in a structure that allows storage of keys and values (e.g Hashtable) which you can send to the front end. You can store the files in the map using the name as the key and the contents as the value. On the front end you display the xml file names and display the contents if they click a particular name.
Jan 7 '09 #2
some code will be really helpful
Jan 7 '09 #3
r035198x
13,262 8TB
I don't like writing .NET code.
Why don't you try it first. You can always post again if you get errors with your code.
Jan 7 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: JDJones | last post by:
We are trying to set up a PHP page to handle server requests for individual web pages that we are moving to a new server. The part that complicates this procedure is that the files will not be...
5
by: jpasqua | last post by:
Is there an XP/SP out there that will return a list of files residing in a specified directory? I'm looking for something simlar to Execute master..xp_subdirs N'C:\' But instead of it...
20
by: max | last post by:
Hi! I'm having a problem with a very simple drop-down list since the page comes out with no elements in the drop-down but giving no errors. This is the code: <form name="year_search_form"...
1
by: Odd Bjørn Andersen | last post by:
Environment: AIX 4.3.3 DB2 UDB WSE version 8.1 fixpack 9a When I access a database residing on this server from my workstation (Windows xp, servicepack2 - db2 udb ESE fixpack 10) and in Control...
1
by: shekhartgs | last post by:
Please tell me how to debug an ASP.NET web application residing on a remote server? Can you pls tell me point by point as I am a new bie to a lil extent. Also please alert me where errors...
2
by: jbguernsey | last post by:
Hi all I have upgraded an Access data file to SQL Server using the wizard (Access XP, 2000 file format). There seems to be no way to direct the SQL Server database files to a specified folder...
1
by: martigras911 | last post by:
Hi, The WorkOrder folder, which contains two Access files (Work Orders.mdb & Work OrdersEng.mdb) used to be resided in the F:\ server (F:\ACCESS\SHARE\ENG\Work Orders). These two files were...
0
by: ssrirao | last post by:
There is an Excel Spreadsheet containing data, residing in an internet site. It’s very easy to Import data from a local Excel Spreadsheet into SQL Server Database Table using DTS. But in my case...
1
by: gireeshmg | last post by:
I need to know how to access a database which is residing in a server from a client.I am using windows2003 server using c#...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.