Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Generally accepted file size threshold of XmlDocument?

Reply
 
Old 04-09-2009   #1 (permalink)
Hillbilly


 
 

Generally accepted file size threshold of XmlDocument?

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?


My System SpecsSystem Spec
Old 04-09-2009   #2 (permalink)
Jeroen Mostert


 
 

Re: Generally accepted file size threshold of XmlDocument?

Hillbilly wrote:
Quote:

> 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.

--
J.
My System SpecsSystem Spec
Old 04-09-2009   #3 (permalink)
Hillbilly


 
 

Re: Generally accepted file size threshold of XmlDocument?

XElement has an in-memory model too but looks easier to read once its
written that can be said. Thaks for reminding me...

"Jeroen Mostert" <jmostert@xxxxxx> wrote in message
news:49de34cb$0$193$e4fe514c@xxxxxx
Quote:

> Hillbilly wrote:
Quote:

>> 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.
>
> --
> J.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Xmldocument encoding question. .NET General
Change threshold on Resource Exhaustion Detector and Resolution(RA Vista performance & maintenance
XmlDocument SelectSingleNode doesn't work PowerShell
ADO and XmlDocument cmdlets? PowerShell
server working for me now, but getting incorrect file size on file Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46