473,583 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to use/keep XML data from file

phl
Hi,

I have some data in an xml file which I need to use in my web form. The
data in the xml file needs to be shown in maybe a repeater, grid or
data control. I will need to parse the data make sense of it and maybe
place it in a data structure. Once I have a meaningful representation
of this data(the format is not exactly how i want it), I would like to
cache it. This data does not change often. So my questions are:

- Would it be easier to write code to parse xml or transform it?
- Is is efficient to hold this data in a dataset/datatable or some kind
of XML object and keep it in application cache?

thanks

phl

May 3 '06 #1
1 1123
In our applications we usually do the following -

class Utility
{

// You may want to consider strongly typed Generic List if you are using
ASP.Net 2.0
static ArrayList xmlData; //contains objects from XML...

static Utility()
{
//Parse the xml file here and put it into a structure which you can
iterate....
loadAndParseXML ();
}
}
The static constructor will be called only once and you can expect xmlData
variable to contain the relavent data when required.

Also object in MyXMLData can expose properties so that you can bind on
repeters, datagrids etc. Since you
can write your own logics for Get methodes and also extra properties if
required, this method has an edge over
dataTable or dataset (Still can be done by adding more columns to tables..
but not all that neat)

HTH

Rajesh CKR
"phl" <ki************ @hotmail.com> wrote in message
news:11******** *************@v 46g2000cwv.goog legroups.com...
Hi,

I have some data in an xml file which I need to use in my web form. The
data in the xml file needs to be shown in maybe a repeater, grid or
data control. I will need to parse the data make sense of it and maybe
place it in a data structure. Once I have a meaningful representation
of this data(the format is not exactly how i want it), I would like to
cache it. This data does not change often. So my questions are:

- Would it be easier to write code to parse xml or transform it?
- Is is efficient to hold this data in a dataset/datatable or some kind
of XML object and keep it in application cache?

thanks

phl


May 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
7643
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not there at all? Any feedback would be helpful. Thanks! -Josh
2
1564
by: Chris Mullins | last post by:
I'm building a GUI that needs to be able to view a large amount of text arranged in rows. Large being anywhere from a few hundred lines through a few hundred thousand. I need a way to "cap" the max number of rows, so that old rows are discarded in favor of new rows if the limit is reached. My use case is very similar to that of the SQL...
10
3431
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net...
0
793
by: David Helgason | last post by:
I think those best practices threads are a treat to follow (might even consider archiving some of them in a sort of best-practices faq), so here's one more. In coding an game asset server I want to keep a large number of file revisions of varying sizes (1Kb-50Mb) inside the database. Naturally I want to avoid having to allocate whole...
5
2735
by: Ryan Liu | last post by:
I have an application need export ane import data of projects. There are about 10 database tables releated to one project. 3 of them each could have up to 100K lines data. I can export all data out into a xml file and then zip it. When I do import, I parse this xml file and then insert into database myself. Or I can export all tables out...
2
2740
by: WB | last post by:
I have an app that will need to store hostorical data (path & filenames) in a combo box (so that the user doesn't have to type in the same data each time the app is restarted). Is it best to keep this data in the registry, or in app.config? I've already asked about using app.config in this context, in a different question in this forum....
12
1868
by: MrQuan | last post by:
G'day all, I have a requirement to communicate between two or more PCs over the Internet, however I have no idea how to go about this. I'm not talking about a chat programme as such, I want to have an application running 24/7 on a 'base PC' connected to the internet that can send out data (like a monitoring application). It's not...
7
2221
by: Gladen Blackshield | last post by:
Hello All! Still very new to PHP and I was wondering about the easiest and simplest way to go about doing something for a project I am working on. I would simply like advice on what I'm asking so I can go and learn it myself through doing (best way for me). I am building a card game as a learning-project as it involves many (to most of...
2
16791
yashg
by: yashg | last post by:
I am building a data backup application in C# using Sockets. It has a server component and a client component. The client is going to upload files to the server through TCP sockets. I've got all figured out and have been able to transfer files between client and server. Now I have some doubts about which is the best method to transfer a file?...
0
7894
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7824
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...
0
8321
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...
1
7931
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...
0
6578
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...
1
5699
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...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1426
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.