Does anyone know of an open source effort to produce a SAX/DOM processor in C#? Here's something amusing... As part of .NET, Microsoft supplies an XmlTextReader class that works as a pull processor. It should work perfectly for any size XML file since all it does is read the file and pass the next node you request. It is a forward-only read-only processor. For some reason, the genius who wrote the code decided to process everything as an offset from the beginning of the file. And furthermore, this genius decided to store that offset as an int. This means that if your XML file is larger that Int32.MaxInt the program craps out! MS acknowledges the error but it won't be fixed anytime soon. Be amused by the code here: http://dotnet.di.unipi.it/Content/sscli/docs/doxygen/fx/bcl/xmltextreader_8cs-source.html
But let’s just look at the numbers - 2^32 bytes = 2^24 KBs = 2^16 MBs = 2^8 GBs = 2^0=1 TB So, one terabyte of XML seems to me quite sufficient for most purposes.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Joined: May 05, 2000
It's actually 2^31 - 1 2,147,483,647 That a little over 2 gig. We have a 6 gig XML file that we are trying to process and we can't unless we either split the file or write our own XML processor. Thus my question about a SAX processor for C#.
Joined: Jul 09, 2001
You are right! Let me try again - 2^32 bytes = 2^22 KBs = 2^12 MBs = 2^2=4 GBs Positive/Negative for int. So exactly 2GB. Cheers, Dan [ October 11, 2002: Message edited by: Dan Drillich ]
The Microsoft SAX2 implementation provides both Microsoft� Visual Basic� and Microsoft Visual C++� interfaces. It is difficult to imagine because all Web developers for MS platform were using VBScript and will continue, in the nearest future. Even I, as SPJP2, have difficulty because Visual Studio.NET have all examples/samples (in MSDN and Helps) on WEB/XML development only for jscript, VBScript, VC++, VB, that are not even compatible with .NET platform. Please correct me, where I am wrong