I want to parse large(4GB-5GB) XML files with .net 4. Because of memory issues I am using XMLReader and to check the extraction condition, I am using XPath. But, in this case, I need to load the data of the specific element node into memory using XElement or XDocument to check the extract condition.
Now, I have a concern that if that specific element node has lots of descendants then the program will definitely face out of memory exception. So, is there any way to avoid the loading of any element node into memory while parsing with condition checking? Any suggestion?
Thanks in advance