By parsing if you mean reading the XML file then try Dataset's ReadXML method.
Use [code]your code here[/code] tags when you post source code
Search here before you post your question, someone might have already asked it before. My Articles
I am simply looking for the computationally-fastest method of buffering this information. This could be manually parsing or using any of the built in XML reading methods in C#, I just want to know which would be the best choice for huge datasets.
I am simply looking for the computationally-fastest method of buffering this information. This could be manually parsing or using any of the built in XML reading methods in C#, I just want to know which would be the best choice for huge datasets.
Well, you will have to measure before you can know anything. I would try it first with the built in parsing classes and see if that won't do what you need. There is no sense in rolling your own XML parser (Chok-full of bugs and inefficiencies) if the built in stuff works just fine. Using compiled xml node iterators can be faster than the DOM (XmlDocument) model, but again, try the easy way first,.
XmlReader if the input file is huge. Otherwise XmlDocument would be just fine. The problem with XmlDocument is that it uses a chunk of memory because it essentially splits the input into a bunch of strings and keeps them all in memory. XmlReader is a forward-only reader and doesn't keep excess stuff in memory so if all you want to do is read the data once (and not query again) XmlReader is your friend.
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
Bookmarks