I try to follow the loading progress of big XML files (I’m not the provider of these files) in dotnet (C#, framework 3.5 SP1) : from 1 MB to 300 MB over a network file share.
I use an XmlReader for loading purpose instead of direct XmlDocument.Load method for speed up the loading process.
By the way I found nowhere on internet/document on how to follow this loading progress: no delegates/events seem exist. Is there any way to perform this task ? Having the kind of functionnality for XML saving purpose could be a nice to have.
Thanks
Assuming you are reading from a stream here is a (non-perfect) example of how to do it…
Basically the ProgressStreamWrapper wraps the file stream and raises an event whenever Position is changed.