XML文件的最大大小? [英] maximum size of an XML file?

查看:881
本文介绍了XML文件的最大大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP.NET项目中使用文件XML来存储信息(仅由管理员输入).我想知道一个项目中允许xml文件的最大大小吗? (大小可以用行数,GB等度量.)
另外,必须通过添加新行以编程方式更新我的xml文件.

也建议我,
实际上,管理员会更新一些数据,而管理员希望列出公司成员的姓名和描述,因此,成员将被添加,更新或删除.该成员信息也将存储在XML中吗?将来永远不会出现太空问题吗?
使用XML文件好吗?

注意:如前所述,只有管理员可以存储信息.也就是说,用户(客户端)将只能在网站上看到更新.

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.

推荐答案

如果您要插入XML文件,我不建议使用XML文件.删除大文件中的行(或者即使您插入或删除单个字符),唯一的方法是编写整个文件的新副本,删除旧文件,然后重命名新副本. XMLDocument会自动为您处理此问题,但是我建议您使用某种类型的数据库-您可以使用单用户数据库,该数据库不需要.NET框架(例如SqlCE)之类的外部软件.这可以应付2GB(SqlCE 2.0)或4GB(SqlCE 3.0)文件.

如果您的管理员要使用文本编辑器手动输入数据,请使用XML:但是,由于数据格式错误,当数据损坏时,可以随时进行技术支持!
请记住,如果您希望有多个用户(管理员+客户端,或两个客户端),则建议不要使用完整的SQL或MySql数据库. XML在多用户环境中不好用!
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!


限制因素是磁盘结构(例如FAT或NTFS),操作系统内核中的内部代码限制了地址空间(32位或32位). 64位)和/或应用程序处理大型文件(再次是32位或64位)的能力.

另外,请记住,为页面文件分配的可用内存和/或磁盘空间量也将限制文件的最大大小.

简而言之,最终答案是取决于".
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".


这篇关于XML文件的最大大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆