且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

的XDocument:是否有可能迫使畸形XML文件的加载?

更新时间:2023-11-24 16:30:10

您不能用的XDocument 因为这个类加载在内存中的所有文件,并完全地解析它。结果
,而它可以处理与的XmlReader 文件>这将让你阅读和处理完整的文档,并在年底你会得到缺少的标签exeption。

You cant do it with XDocument because this class loads all document in memory and parse it completly.
But its possible to process document with XmlReader it would get you to read and process complete document and at the end youll get missing tag exeption.