XPathDocument何时实际加载文件? [英] When does XPathDocument load the file actually?

查看:58
本文介绍了XPathDocument何时实际加载文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

string filename =" myFile.xml" ;;

XPathDocument xpd = new XPathDocument(filename);

XPathNavigator xpn = xpd.CreateNavigator();

你知道XPathDocument何时真正将xml文件加载到内存中吗?

Do you know when XPathDocument really loads the xml file to the memory?

创建对象时,或创建导航器时,还是任何其他时间?

When creating the object, or when creating the navigator, or any other time?

我想放在Cache对象中加载文档的过程,但是当对象出现时已创建,它不会将文档加载到其内存中。

I want to put the process of loading the document in Cache object, but it seems when the object is created, it doesn't load the document in its memory.

非常感谢任何有用的想法。

Any useful thoughts is highly appreciated.

推荐答案

这是XPathDocument构造函数的代码:

This is code of XPathDocument constructor:




代码片段


这篇关于XPathDocument何时实际加载文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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