[Mono-list] XMLDocument.Load() With Path Fails on Windows

JD Conley jconley@winfessor.com
Mon, 30 Jun 2003 23:21:16 -0700


This is a multi-part message in MIME format.

------_=_NextPart_001_01C33F98.FA95C175
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

The following code snippet will fail to load the xml document located in
the same path as the output binary under Windows.  Attached is the xml
file I was trying to load.  This was done on Mono-0.25.  The same code
worked quite well on 0.24.

private void breakXML()=20
{
System.Xml.XmlDocument x =3D new System.Xml.XmlDocument();
x.Load("broken.xml");
}

The stack trace is as follows:
System.NotSupportedException: file:///c:/test/broken.xml
in <0x00188> 00 System.Net.WebRequest:GetCreator (string)
in <0x00050> 00 System.Net.WebRequest:Create (System.Uri)
in <0x00060> 00 System.Net.WebClient:SetupRequest (string)
in <0x00063> 08 System.Net.WebClient:SetupRequest (string)
in <0x00022> 00 System.Net.WebClient:OpenRead (string)
in <0x00063> 08 System.Net.WebClient:OpenRead (string)
in <0x00071> 00 System.Xml.XmlUrlResolver:GetEntity
(System.Uri,string,System.Type)
in <0x00110> 00 Mono.Xml.Native.XmlInputStream:.ctor
(string,bool,System.Xml.XmlResolver,string)
in <0x000a5> 08 Mono.Xml.Native.XmlInputStream:.ctor
(string,bool,System.Xml.XmlResolver,string)
in <0x00035> 00 Mono.Xml.Native.XmlStreamReader:.ctor
(string,bool,System.Xml.XmlResolver,string)
in <0x00018> 00 Mono.Xml.Native.XmlStreamReader:.ctor
(string,System.Xml.XmlResolver,string)
in <0x0008a> 08 Mono.Xml.Native.XmlStreamReader:.ctor
(string,System.Xml.XmlResolver,string)
in <0x0003a> 00 System.Xml.XmlTextReader:.ctor
(string,System.Xml.XmlNameTable)
in <0x0003b> 00 System.Xml.XmlTextReader:.ctor (string)
in <0x0002a> 00 System.Xml.XmlDocument:Load (string)
in <0x0003f> 00 Winfessor.SoapBox.Test.Application.Class1:breakXML ()
in <0x00019> 00 Winfessor.SoapBox.Test.Application.Class1:Run ()

---
JD Conley
www.winfessor.com

------_=_NextPart_001_01C33F98.FA95C175
Content-Type: text/xml;
	name="broken.xml"
Content-Transfer-Encoding: base64
Content-Description: broken.xml
Content-Disposition: attachment;
	filename="broken.xml"

77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8+IA0KPHRlc3Q+PC90ZXN0
Pg==

------_=_NextPart_001_01C33F98.FA95C175--