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
David Browne - 27 Nov 2006 17:41 GMT
> Hi,
> I am looking for component which allows me to parse my xml file.
[quoted text clipped - 8 lines]
> no examples for .net , and very bad documentation.
> p.s : I am writing in C#.
System.Xml.XmlReader?
David
joachim@yamagata-europe.com - 28 Nov 2006 08:44 GMT
> System.Xml.XmlReader?
For files above 1GB this won't work. If the xml has not been formatted,
all the data is on one line, and you won't succeed in reading it.
I had to do something similar, so I wrote a buffered reader myself and
took care of the parsing by an aho-corasick search engine with
callbacks placed on top of it. This is more or less the way sax works.
Parsing time for 2GB was reduced to 3 minutes :-).
Drop me a line if you want to know more,
Regards,
Joachim