How big can XML file be?

  • Thread starter Thread starter kids_pro
  • Start date Start date
K

kids_pro

Hi there,

I have a quick question. I want to store all my data in XML file so that I
don't need to depend on database backend. But I wonder how big can my XML
file be?

I don't mind to span the data into multiple file but I less I know the
limitation first.

Cheers,
Kids
 
Well, the XML engine might have some inherit limit as far as the number of
child nodes for instance. After all, if Count is an int, then at least you
cannot exceed that max value.

More interesting concerns might be the memory usage and the processing time.
The memory footprint for XML (if loaded in a DOM) is probably exponential.
Also, the time required to access a node is also great if using an XPath.

For small requirements, it might not be a big problem, but these are also
issues you need to consider when using XML rather then RDBMS.

Although, I do not know exact numbers to answer your questions.
 
Really Really Really Big.
I've read news items where they were discussing the best
methodology to manage a 52Mb file.
 
52 MB ? Wow that is more than enough for my problem.
My estimate size if about half of this.

I only have less than 4 level nodes.
So you think XPath can live with this requierment?

I reason I go to XML rather RDBMS (like Ms. Access or SQL)
cuz it doesn't support our unicode set 1780-17FF I can't make query using
these RDBMS.

Cheers,
Kids
 
Using a DOM approach the limit would logically be the
amount of RAM available.
Therefore, a gigabyte XML document is not very likely
to be able to be parsed using DOM.
However, using a SAX approach or System.Xml.XmlReader,
it would, at least in theory, be possible.
 
Dennis said:
Using a DOM approach the limit would logically be the
amount of RAM available.
Therefore, a gigabyte XML document is not very likely
to be able to be parsed using DOM.
However, using a SAX approach or System.Xml.XmlReader,
it would, at least in theory, be possible.

It's certainly possible with an XmlTextReader - I've processed xml files
well in excess of a gigabyte (on occasion closer to 3 GB) whilst testing
the large-file capabilities of some inhouse software. I wouldn't want to
try it with an XmlDocument or DataSet though.
 
Hi,

It depends of your platform, memory availability, etc

I have a 13-15 MB xml file and it works just fine.
Please note that this is only intended for datastorage, In memory it's a
dataset.

cheers,
 
Hi there,

I have a quick question. I want to store all my data in XML file so
that I don't need to depend on database backend. But I wonder how big
can my XML file be?

I don't mind to span the data into multiple file but I less I know the
limitation first.

we have xml files with map data that has sizes above 1gb each.

takes time to parse, but they work
 
If you are going to process a large XML file you should use XmlTextReader (as opposed to XmlDocument or XPathDocument) as XmlTextReader doesn?t parse the document into a DOM tree.

The only drawback is your code is more complex as you are writing to a lower level interface rather than using XPath.

Regards

Richard Blewett ? DevelopMentor
http://staff.develop.com/richardb/weblog
?
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/
Is it okay to query large XML file?
What is the best practise?

"Kim Schulz" wrote in message news:[email protected]...
we have xml files with map data that has sizes above 1gb each.

takes time to parse, but they work


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004

[microsoft.public.dotnet.languages.csharp]
 
Back
Top