Groups | Blog | Home
all groups > dotnet framework > november 2006 >

dotnet framework : High Performance Xml parser


rony
11/27/2006 9:16:34 AM
Hi,
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
Frans Bouma [C# MVP]
11/28/2006 3:10:10 AM
[quoted text, click to view]

In general xmltextreader or other xmlreader class is best for this: it
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#)
AddThis Social Bookmark Button