Performance: XmlReader or LINQ to XML
问题 I have a 150 MB XML file which is used as DB in my project. Currently I'm using XmlReader to read content from it. I want to know if it is better to use XmlReader or LINQ to XML for this scenario. Note that I'm searching for an item in this XML and display search result, so it can take a long time or just a moment. 回答1: If you want performance use XMLReader. It doesn't read the whole file and build the DOM tree in memory. It instead, reads the file from disk and gives you back each node it