|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
High Performance Xml parserHi,
I am looking for component which allows me to parse my xml file. the reason i am asking this, is because my xml files are huge it can reach as far as 1GB more or less. the time to parse such a file is something like 5 Hours. Now i am using the XmlRead, XmlNode ... (I do not load the file to the memory). Can you suggest better components to use? ** I tried SAX but i couldn't understand how it works, because there is no examples for .net , and very bad documentation. p.s : I am writing in C#. Regards, Rony rony wrote:
> Hi, In general xmltextreader or other xmlreader class is best for this: it> I am looking for component which allows me to parse my xml file. > the reason i am asking this, is because my xml files are huge it can > reach as far as 1GB more or less. > the time to parse such a file is something like 5 Hours. > Now i am using the XmlRead, XmlNode ... (I do not load the file to the > memory). > Can you suggest better components to use? > > ** I tried SAX but i couldn't understand how it works, because there > is no examples for .net , and very bad documentation. > p.s : I am writing in C#. allows you to read elements and attributes rather easily. If you add some small utility routines to your own code to quickly interpret attributes it's straight forward. 'Parsing' isn't the problem here. Parsing is about checking if the xml is correct. It's interpreting the xml data that's the problem. btw, 1GB xml files... why on earth did you pick xml? Wouldn't a more flat-file approach be better? FB -- ------------------------------------------------------------------------ Lead developer of LLBLGen Pro, the productive O/R mapper for .NET LLBLGen Pro website: http://www.llblgen.com My .NET blog: http://weblogs.asp.net/fbouma Microsoft MVP (C#) ------------------------------------------------------------------------ |
|||||||||||||||||||||||