User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 361,909 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,559 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
Views: 1840 | Replies: 1
Reply
Join Date: Aug 2005
Location: Ohio
Posts: 204
Reputation: plazmo is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 16
plazmo's Avatar
plazmo plazmo is offline Offline
Posting Whiz in Training

xml appending

  #1  
Sep 12th, 2006
Ok, so im having data written to an xml file. This xml is regularly written to, so a decent amount of traffic on it. But rarely ever gets viewed.

Right now i read the xml file in with XmlDocument..Load()
Then modify it.
and overwrite using XmlDocument..Save();

Gets the job done perfectly. But i have a few concerns.

Does XmlDocument.Load() put the whole xml document into memory? This file may get large(100mb?) so i dont want to use up a lot of memory if many people are hitting it at once.

And. When many people are hitting it at once. Is there a chance data will be over written/lost if 2 people are using it at once?

What i need help on i guess is a way to directly write at the end of an xml file without loading it. Thanks!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2006
Posts: 26
Reputation: chmonalisa is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
chmonalisa chmonalisa is offline Offline
Light Poster

Re: xml appending

  #2  
Sep 14th, 2006
hi plazmo,

You can only edit an xml file by loading it completelely.

Since many users hit this xml file , there is every possibility of data loss.

If you want to view only a small content from the xml file, write an xsl file to show only what is needed.

So you can alwasy access the xslt file which gets only the required content and displays it.
But in order to edit, you have to load the entire xml file.
To remove conflicts, it's better you keep this xml file in an ASP page and access the asp page. Then we can make it mandatory that only one person at a time can access the xml file.
please feel free to mail your concerns.

Thanks,
Chaitanya.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C# Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 9:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC