为什么System.Xml.XmlDocument.LoadXml方法抛出System.Net.WebException?
这真的是令人难以置信的疯狂,如果MSDN是对的,LoadXml应该最多给我一个System.Xml.XmlException.
但我有奇怪的例外:
The underlying connection was closed: The connection was closed unexpectedly.
- Dim document As New XmlDocument
- document.LoadXml("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><x></x>")
- MsgBox(document.LastChild.Name)
造成异常的是什么?