处理XML没有在内存中加载整个文档? [英] Processing XML without loading entire document in memory?

查看:135
本文介绍了处理XML没有在内存中加载整个文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个.NET的XPathNavigator,可以读取XML,而无需加载在内存中的整个文档(这是XPathDocument中一样)。是否有这样做,还是我写我自己的类?

I'm looking for a .NET XPathNavigator that can read XML without loading the entire document in memory (which is what XPathDocument does). Is there a class that does this, or do I have to write my own?

推荐答案

尝试的 System.Xml.XmlReader 如果你想读的流。

Try System.Xml.XmlReader if you want to read in a stream.

我不知道导航在XML流的XPathNavigator的。 您可能必须构建。

I don't know of an XPathNavigator that navigates on a XML stream. you may have to build that.

您可以把它AmnesiacXPathNavigator,因为它会通过流中读取再起,为你评估它的每个XPath查询。

You could call it AmnesiacXPathNavigator, because it would have to read through the stream anew, for every xpath query you evaluate on it.

这篇关于处理XML没有在内存中加载整个文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆