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()
{
System.Xml.XmlDocument x = 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
<?xml version="1.0" encoding="utf-8" ?>
<test></test>