XmlDocument加载功能为大型XML文件提供了内存不足异常

XmlDocument加载功能为大型XML文件提供了内存不足异常

本文介绍了XmlDocument加载功能为大型XML文件提供了内存不足异常(135mb)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


XmlDocument xmlDom = new XmlDocument();
xmlDom.Load("D:\CPDCL_01HW342889_ALL_new.xml");


据我说,Innerxml的数据成员不能保存此大字符串数据,因为在加载XML时,它显示了内存异常之外的innerxml.

由于XML文件为135 MB,所以我们无法附加.因此,请让我知道如何加载大容量(135 MB).
XML文件.

谢谢
阿比(Abhi)

============================

错误消息显示如下,

InnerXml = Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.


According to me Innerxml data member of XmlDocument can not able to hold this large string data, as its showing innerxml out of memmory exception, when we load the XML.

Since XML file is 135 MB, so we can not attach. So please let me know how to load the large (135 MB).
XML file.

Thanks
Abhi

==============================

The error message was showing as follows,

InnerXml = Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.

推荐答案


FileStream filestream = File.OpenRead(pathtofile);
XMLDocument objDOM = new XMLDocument();
objDOM.Load(filestream)



这篇关于XmlDocument加载功能为大型XML文件提供了内存不足异常(135mb)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 01:32