Last post Feb 15, 2013 06:38 PM by Mikesdotnetting
Feb 15, 2013 12:02 PM|abhilash gaddam|LINK
I am getting the following error if i try to upload an XML document."An unhandled exception of type 'System.OutOfMemoryException' occurred in mscorlib.dll".
XmlDocument objXmlDoc = new XmlDocument();
the Xml file is more than 1gb
How to over come this problem?
Feb 15, 2013 06:38 PM|Mikesdotnetting|LINK
You need to use an XmlReader and feed the document in as a stream: http://msdn.microsoft.com/en-us/library/756wd7zs.aspx
You can use the XElement.Load method that accepts an XmlReader to load specific nodes, and then query them using LINQ: http://msdn.microsoft.com/en-us/library/bb538300.aspx