Generally accepted file size threshold of XmlDocument?

  • Thread starter Thread starter Hillbilly
  • Start date Start date
H

Hillbilly

I have a test file that contains 3.28 MB with 10,000 entries that will need
to be parsed. What is --generally-- considered an acceptable file size
threshold
when working with the XmlDocument?
 
Hillbilly said:
I have a test file that contains 3.28 MB with 10,000 entries that will need
to be parsed. What is --generally-- considered an acceptable file size
threshold
when working with the XmlDocument?

Whatever fits in your server's memory and offers acceptable loading times.
Try it out!

Less flippantly, there's little point in pinning down a fixed size where
XmlDocument is "acceptable". If you already know you are going to be
processing big files (or files that are potentially unlimited in size,
anyway), go with XmlReader and/or XPathDocument from the start, as unlike
XmlDocument they scale. This isn't much harder than using XmlDocument,
unless you need in-memory editing, in which case it's slightly trickier --
you'll have to weigh the added development time against the need for scaling.

Even for small documents where XmlDocument could be used, XElement is cooler
still. XmlDocument's DOM approach is rather clumsy.
 
XElement has an in-memory model too but looks easier to read once its
written that can be said. Thaks for reminding me...
 
Back
Top