Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 15, 2013 10:38 PM by Mikesdotnetting
Feb 15, 2013 04:02 PM|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 10:38 PM|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