944,111 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 4117
  • C# RSS
Sep 12th, 2006
0

xml appending

Expand Post »
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!
Similar Threads
Reputation Points: 23
Solved Threads: 16
Posting Whiz in Training
plazmo is offline Offline
206 posts
since Aug 2005
Sep 14th, 2006
0

Re: xml appending

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.
Reputation Points: 11
Solved Threads: 1
Light Poster
chmonalisa is offline Offline
26 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: What is config file used for?
Next Thread in C# Forum Timeline: How to COmpare a word file and an XML file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC