为什么在创建XPathDocument时会收到Web异常? [英] Why do I get web exception when creating an XPathDocument?

查看:137
本文介绍了为什么在创建XPathDocument时会收到Web异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用引用的DTD创建XPathDocument有时会引发Web异常。为什么?

Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?

推荐答案

请参阅 http://todotnet.com/archive/2006/07/27/8248.aspx


因为在
XPathDocument的构造中,有一个http GET
命令来查看是否可以访问
DTD。没有对
DTD做任何事情。这是为了防万一。所以当
XPathDocument最初设置为
是一个更快的替代
XmlDocument,你将有
额外的额外开销http请求
需要解决。想象一下
,服务器位于地球上
的另一边!

Because in the construction of XPathDocument, there's an http GET command to see if it can access the DTD. It's not doing anything with the DTD. It's for just in case. So while XPathDocument is initially set up to be a faster alternative to XmlDocument, you'll have the additional overhead of an http request that needs to be resolved. Imagine that server being on the other side of the globe!

这篇关于为什么在创建XPathDocument时会收到Web异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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