473,748 Members | 6,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

list xml files residing in web server

2 New Member
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(intrane t)..other is at my side which is online website.frequen tly 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.Crea te(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(N ew StringWriter(SB ))

objResponse = CType(objReques t.GetResponse, HttpWebResponse )

objStreamReader = New StreamReader(ob jResponse.GetRe sponseStream())

Dim xmlRepDoc As New XmlDocument
xmlRepDoc.Load( objStreamReader )

xmlRepDoc.Write To(XW)
XW.Close()
ds.ReadXml(New StringReader(SB .ToString))
dt = ds.Tables(0)
Jan 7 '09 #1
3 1474
r035198x
13,262 MVP
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
saurabhthakur
2 New Member
some code will be really helpful
Jan 7 '09 #3
r035198x
13,262 MVP
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
3822
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 mirrored on the new server. Instead many will be residing in new directories and subdirectories than they were in on the old server. What we wanted to do was when someone requested a specific page from our old server, it would recognize the...
5
21023
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 returning a list of subdirs I want it to return a list of files in that directory.
20
2301
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" method="post" action="results.php"> <select name="select_year" id="select_year"> <? $query="SELECT * FROM table ORDER BY year"; $result = mysql_query($query) or die ("Error in query: $query. "
1
4108
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 Center try to list the tablespaces (click on Tablespaces in the left part of the GUI) I get this error message: "SQL0444N Routine "*GET_TBSP" (specific name "SNAP_GET_TBSP") is implemented with code in library or path...
1
1282
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 might come in the process of remote debug. Thanks a ton, shekhar
2
1195
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 during this process. I now have the SQL Server database residing on a server on drive C: but it would be better on drive E: Does anyone know of a simple way to move the SQL Server database or force the upgrade to go to a specified folder?
1
2308
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 moved to another server called J:\ (J:\Work Orders), and soon after these files were moved, I'm not able to open it. Every time I opened the Work Orders.mdb, I got an error: 'F:\ACCESS\SHARE\ENG\Work OrdersEng.mdb' is not a valid path. After...
0
3235
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 the Excel spreadsheet resides an internet site which has a static name (Example xyz.xls) but varying data inside it. The spreadsheet contains three columns a, b, c and data below it. Only data get updated weekly So basically I have to automate...
1
925
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
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.