Click here to Skip to main content
14,485,552 members
Rate this:
Please Sign up or sign in to vote.
See more:
I'm using a file XML in my ASP.NET project to store information (entered by admin only). I would like to know the maximum size of an xml file is allowed in a project?. (size can be measured in number of lines, GB,etc.).
Also, My xml file must be updated programatically by adding new lines.

Also suggest me,
Actually, some data by admin would be updated and admin want to list of name and description of members of a company, so,members would be add, update or delete. Would this member information too store in XML? Would never issue of space came in future?
IS using of XML file good?

Note: as already told only admin would going to store information. i.e. user (client) would be only able to see the updates in website.
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 2

I wouldn't recommend an XML file if you are going to be inserting and removing lines in a big file (or even if you insert or remove single characters) The only way you can do that is to write a new copy of the entire file, delete the old one, and rename the new copy. This is handled automatically for you by XMLDocument, but I would recommend a database of some type instead - you can use single-user databases which require no external software other than the .NET framework, such as SqlCE. This could cope with 2GB (SqlCE 2.0) or 4GB (SqlCE 3.0) files.

If your admin is going to hand enter the data with a text editor, then go with the XML: but be ready for support calls when the data is broken because he got the format wrong!

Bear in mind that if you expect multiple users (admin + client, or two clients) than I would suggest going for a full SQL or MySql database instead. XML is not good in multiuser environments!
   
Comments
tanishtaman 3-May-11 11:28am
   
I got, what ever you said. Thanks for your reply.

For one user i.e.admin, Is storing data in XML fine?
OriginalGriff 3-May-11 11:32am
   
If it is small, and doesn't change much, yes.
If it is big, then it is not an efficient way to store the data, particularly if it changes often.
tanishtaman 3-May-11 11:33am
   
thanks...
Manfred Rudolf Bihy 3-May-11 11:56am
   
Good answer! 5+
Rate this:
Please Sign up or sign in to vote.

Solution 1

The limiting factors are disk structure (e.g. FAT or NTFS), the internal code in the Operating System kernel which limits the address space (32-bit or 64-bit), and/or the ability of the application program to address large files (again, 32-bit or 64-bit).

Also, keep in mind that the amount of available memory and/or disk space allocated for the paging file will also limit the maximum size a file can be.

In short, the final answer is, "It depends".
   
Comments
tanishtaman 3-May-11 11:29am
   
thank you for your reply, It would be helpful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100